Hi everybody

I needed to change the jelly servlet to fit my needs and i think that the servlet doesn't offer that much when you are willing to map for example *.jelly files to servlet : org.apache.commons.jelly.JellyServlet.

Here is my proposition for a revision of the function getScript, using getServletPath instead of getPathInfo()


protected URL getScript(HttpServletRequest req) throws MalformedURLException {

String scriptUrl = req.getParameter("script");
if (scriptUrl == null) {
// original
scriptUrl = req.getPathInfo();
ScriptUrl = req.getServletPath();
}
URL url = getServletContext().getResource(scriptUrl);
if (url == null) {
throw new IllegalArgumentException("Invalid script url:" + scriptUrl);
}
return url;
}


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to