diff --git a/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java b/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java index 7dda482..8c64d49 100755 --- a/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java +++ b/src/fr/devinsy/kiss4web/SimpleServletDispatcher.java @@ -32,14 +32,14 @@ public class SimpleServletDispatcher extends HttpServlet private static final long serialVersionUID = -3471226305721330069L; static private Logger logger = LoggerFactory.getLogger(ServletDispatcher.class); - static final protected Pattern SHORT_REWRITED_URL_CLASS = Pattern.compile("^([^-]+)-.+\\.xhtml$"); - static final protected Pattern SHORT_REWRITED_URL_PARAMETERS = Pattern.compile("^[^-]+-(.+)\\.xhtml$"); - static final protected Pattern LONG_REWRITED_URL_CLASS = Pattern.compile("^([^-]+)-/.*$"); + static final private Pattern SHORT_REWRITED_URL_CLASS = Pattern.compile("^([^-]+)-.+\\.xhtml$"); + static final private Pattern SHORT_REWRITED_URL_PARAMETERS = Pattern.compile("^[^-]+-(.+)\\.xhtml$"); + static final private Pattern LONG_REWRITED_URL_CLASS = Pattern.compile("^([^-]+)-/.*$"); // static final protected Pattern LONG_REWRITED_URL_PARAMETERS = // Pattern.compile("^.+-/(.)+*$"); - static final protected Pattern REWRITE_PARAMETER = Pattern.compile("[^%\\w\\d]"); + static final private Pattern REWRITE_PARAMETER = Pattern.compile("[^%\\w\\d]"); - protected String webclassesRootPath; + private String webclassesRootPath; /** * "Code can be shortest, speedest and memory smallest, but not the three in same time, only two" @@ -96,13 +96,21 @@ public class SimpleServletDispatcher extends HttpServlet // /* * In past, possibility to use the servlet path was enable. It is too - * complexe, not kiss mind. String path; if (request.getPathInfo() == - * null) { // web.xml url-pattern= *.xhtml path = - * request.getServletPath(); } else { // web.xml url-pattern = /* path = - * request.getPathInfo(); } + * complexe, not kiss mind. + * + * String path; + * if (request.getPathInfo() == null) + * { + * // web.xml url-pattern= *.xhtml + * path = request.getServletPath(); + * } + * else + * { + * // web.xml url-pattern = + * path = request.getPathInfo(); + * } */ - // String path = request.getRequestURI(); - String path = request.getPathInfo(); + String path = request.getRequestURI(); if ((!path.endsWith("/")) && (!path.endsWith(".xhtml")) && (!path.contains("-/"))) {