Exemplo n.º 1
0
 @Override
 public UrlContent execute(UrlContent content) throws CannotParserException {
   String request = content.request.toLowerCase();
   int index = request.indexOf(".nsf");
   if (index == -1) {
     return null;
   }
   content.module = request.substring(0, index + 4);
   content.path = request.substring(index + 4);
   return content;
 }
Exemplo n.º 2
0
 @Override
 public UrlContent execute(UrlContent content) throws CannotParserException {
   if (content.query == null) {
     return null;
   }
   String nav = StringUtil.getParameter(content.query, "nav");
   if (nav == null || !nav.startsWith("/")) {
     return null;
   }
   if (nav.endsWith(".jsp")) {
     nav = nav.substring(0, nav.length() - 4);
   }
   UrlContent result = UrlParser.parse(nav, content.custom);
   if (result == null) {
     return null;
   }
   content.module = result.module;
   content.path = ".index";
   content.query = null;
   return content;
 }