[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
How many GNUJSP are there? & Bugfixes for GNUJSP 1.0a3
Hi!
I'm a bit confused. How many GNUJSP are out there now? What happend to
Paul Siegmann's. implementation?
Nevertheless: here are some bugfixes for GNUJSP1.0a3.
The method requestToJSPFile is buggy. It works better this way:
/**
* Map the request to an actual jsp file.
*/
File requestToJSPFile (HttpServletRequest req) throws
ServletException {
String servletPath = urlDecode(req.getServletPath ());
String filePath = null;
if (servletPath == null) {
servletPath = urlDecode(req.getRequestURI ());
}
if (servletPath != null) {
filePath = getServletContext ().getRealPath (servletPath);
if (filePath == null) {
if ((filePath = req.getPathTranslated ()) == null) {
throw new ServletException ("No JSP page specified.");
}
else {
if (pageBase != null) {
return new File (pageBase, filePath);
}
}
}
}
else {
throw new ServletException ("No JSP page specified.");
}
return new File (filePath);
}
Also it would be nice if someone added the last line of this snippet of
JSP10Servlet (starting line 76):
if (scratchPath == null && repository == null) {
config.getServletContext ().log ("Throwing the ex.");
throw new ServletException ("Mandatory init parameter " +
"\"scratchdir\" has not been " +
"specified" + time);
}
if (compilerCommand == null)
compilerCommand = "builtin-javac -classpath %classpath%" +
File.pathSeparator +
"%repository% -d %repository% -deprecation %source%";
repository = new File (scratchPath);
repository.mkDirs(); // line added to make sure the dir exists.
Cheers,
-hendrik
- - - - - - - - - - - - - - - - - - - - - - - - - - -
The WebApp Framework http://www.webapp.de/
jo! small&smart 2.1 servletengine
Persistence objectrelational mapping
Java Server & Servlets The German servlet book