net.sf.basedb.clients.web.servlet
Class CompileAll
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.sf.basedb.clients.web.servlet.CompileAll
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
public final class CompileAll
- extends HttpServlet
This servlet will scan for all files ending with .jsp and issue
a request for them with the parameter jsp_precompile=true
therby compiling all JSP files into servlets.
This code is based on code written by RĂ©al Gagnon:
http://www.rgagnon.com/javadetails/java-0414.html
- Version:
- 2.0
- Author:
- nicklas
- See Also:
- Serialized Form
- Last modified
- $Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
pathComparator
private static final Comparator pathComparator
CompileAll
public CompileAll()
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
- Overrides:
doGet
in class HttpServlet
- Throws:
IOException
ServletException
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
- Overrides:
doPost
in class HttpServlet
- Throws:
IOException
ServletException
compile
private boolean compile(String dir,
HttpServletRequest request,
HttpServletResponse response)
throws IOException
- Compile all files found in dir, recursively entering subdirectories.
- Parameters:
dir
- The starting directoryrequest
- response
-
- Throws:
IOException