2.17.2: 2011-06-17

net.sf.basedb.clients.web.servlet
Class CompileAll

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by 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) $

Field Summary
private static Comparator pathComparator
           
private static long serialVersionUID
           
 
Constructor Summary
CompileAll()
           
 
Method Summary
private  boolean compile(String dir, HttpServletRequest request, HttpServletResponse response)
          Compile all files found in dir, recursively entering subdirectories.
 void doGet(HttpServletRequest request, HttpServletResponse response)
           
 void doPost(HttpServletRequest request, HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

pathComparator

private static final Comparator pathComparator
Constructor Detail

CompileAll

public CompileAll()
Method Detail

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 directory
request -
response -
Throws:
IOException

2.17.2: 2011-06-17