[ http://issues.apache.org/jira/browse/JELLY-177?page=comments#action_57998 ] Marc DeXeT commented on JELLY-177: ----------------------------------
hans Gilde said : > Marc, could you give me an example of someting that works after this change > but not before? Sure. It's about url mapping. I have create a little jelly web library (remind me to ask to create a new subproject jelly web :)) where you can create a web page as a JSP : include, forward and so on. An url is http://myhost:8082/demo/appli.jelly?page=browse.jelly URL mapping is in WEB-INF/web.xml ... <servlet> <servlet-name>Jelly</servlet-name> <servlet-class>fr.dsi.cnrs.jetty.servlet.ImprovedCachedJellyServlet</servlet-class> </servlet> ... <servlet-mapping> <servlet-name>Jelly</servlet-name> <url-pattern>*.jelly</url-pattern> </servlet-mapping> when such url-mapping is used, the "/appli.jelly" part of path is not in javax.servlet.http.HttpServletRequest.getPathInfo() _BUT_ in javax.servlet.http.HttpServletRequest.getServletInfo(). So I get the script with this last (getServletInfo). So this improvement (JELLY-177) enable real url-mapping to a jellyServlet. Do I have answered to you ? Waht do you think about create a jelly-web sandbox to use jelly script as an full web application script ? :) > In JellyServlet, the procedure used to determine the script's location is too > simplistic > ---------------------------------------------------------------------------------------- > > Key: JELLY-177 > URL: http://issues.apache.org/jira/browse/JELLY-177 > Project: jelly > Type: Bug > Components: core / taglib.core > Versions: 1.0-beta-5, 1.0-RC1 > Environment: Servlet, 1.0RC1 > Reporter: Denis Robert > Priority: Minor > Fix For: 1.0-RC2 > > In JellyServlet, the procedure used to determine the script's location is too > simplistic; it misses simple cases like the a *.jelly servlet-mapping. > I suggest replacing the getScript method with something like (taken in part > from the Freemarker servlet): > protected URL getScript(HttpServletRequest req) > throws MalformedURLException { > String scriptUrl = null; > > String includedPath = (String) > req.getAttribute("javax.servlet.include.servlet_path"); > if (includedPath != null) { //This is the result of a > RequestDispatcher include... > String includedPathInfo = (String) > req.getAttribute("javax.servlet.include.path_info"); > if (includedPathInfo != null) { > scriptUrl = includedPathInfo; > } else { > scriptUrl = includedPath; > } > } else { > scriptUrl = req.getParameter("script"); > if (scriptUrl == null) { > scriptUrl = req.getPathInfo(); > } > if (scriptUrl == null) { > scriptUrl = req.getServletPath(); > } > } > > URL url = getServletContext().getResource(scriptUrl); > if (url == null) { > throw new IllegalArgumentException("Invalid script url:" > + scriptUrl); > } > return url; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]