com.judoscript.jusp
Class JuspServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.judoscript.jusp.JuspServlet
- All Implemented Interfaces:
- JuspContext, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public final class JuspServlet
- extends javax.servlet.http.HttpServlet
- implements JuspContext
- See Also:
- Serialized Form
Field Summary |
static boolean |
isLocal
|
static org.apache.commons.logging.Log |
logger
|
Method Summary |
void |
error(JuspRequest request,
JuspResponse response,
javax.servlet.http.HttpSession session,
java.lang.Throwable ex)
|
void |
forward(java.lang.String uri,
java.lang.String refUri,
java.lang.String refFilePath,
JuspRequest request,
JuspResponse response,
javax.servlet.http.HttpSession session,
java.lang.Object form,
java.lang.Object error)
|
java.lang.String |
getContextBasePath()
|
java.lang.String |
getContextBaseURI()
|
java.lang.String |
getJuspWorkDir()
|
int |
getUploadMaxMemorySize()
|
long |
getUploadMaxRequestSize()
|
java.lang.String |
getUploadTempDirectory()
|
java.lang.String[] |
getUriAndPath(java.lang.Object request)
|
void |
init(javax.servlet.ServletConfig config)
Does these steps:
Prepare the JuSP preprocessor, "com/judoscript/jusp/jusp_prep.judo". |
void |
invoke(java.lang.String uri,
java.lang.String refUri,
java.lang.String refFilePath,
JuspRequest request,
JuspResponse response,
javax.servlet.http.HttpSession session,
java.lang.Object form,
java.lang.Object error)
|
void |
redirect(java.lang.String uri,
JuspResponse response)
|
protected void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
setCheckTimestamp(boolean set)
|
void |
setDefaultContentType(java.lang.String type)
|
void |
setDefaultPageEncoding(java.lang.String enc)
|
void |
setPrintStackTrace(boolean set)
|
void |
setSystemErrorPageURI(java.lang.String uri)
|
void |
setUploadLimits(int maxMemSize,
long maxRequestSize)
|
void |
setUploadTempDir(java.lang.String tmpDir)
|
void |
setUserErrorPageURI(java.lang.String uri)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static org.apache.commons.logging.Log logger
isLocal
public static boolean isLocal
JuspServlet
public JuspServlet()
getJuspWorkDir
public java.lang.String getJuspWorkDir()
- Specified by:
getJuspWorkDir
in interface JuspContext
setCheckTimestamp
public void setCheckTimestamp(boolean set)
- Specified by:
setCheckTimestamp
in interface JuspContext
setDefaultContentType
public void setDefaultContentType(java.lang.String type)
- Specified by:
setDefaultContentType
in interface JuspContext
setDefaultPageEncoding
public void setDefaultPageEncoding(java.lang.String enc)
- Specified by:
setDefaultPageEncoding
in interface JuspContext
setSystemErrorPageURI
public void setSystemErrorPageURI(java.lang.String uri)
- Specified by:
setSystemErrorPageURI
in interface JuspContext
setUserErrorPageURI
public void setUserErrorPageURI(java.lang.String uri)
- Specified by:
setUserErrorPageURI
in interface JuspContext
setPrintStackTrace
public void setPrintStackTrace(boolean set)
getUploadMaxMemorySize
public int getUploadMaxMemorySize()
- Specified by:
getUploadMaxMemorySize
in interface JuspContext
getUploadMaxRequestSize
public long getUploadMaxRequestSize()
- Specified by:
getUploadMaxRequestSize
in interface JuspContext
getUploadTempDirectory
public java.lang.String getUploadTempDirectory()
- Specified by:
getUploadTempDirectory
in interface JuspContext
setUploadLimits
public void setUploadLimits(int maxMemSize,
long maxRequestSize)
- Specified by:
setUploadLimits
in interface JuspContext
setUploadTempDir
public void setUploadTempDir(java.lang.String tmpDir)
- Specified by:
setUploadTempDir
in interface JuspContext
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Does these steps:
- Prepare the JuSP preprocessor, "com/judoscript/jusp/jusp_prep.judo".
- Parse "juspInit.judo" or what's specified by 'juspInitFile'.
- creates a global runtime context and add global variables, and
- runs the JuSP initialization script within.
- Specified by:
init
in interface javax.servlet.Servlet
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
service
protected void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
service
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
getContextBasePath
public java.lang.String getContextBasePath()
- Specified by:
getContextBasePath
in interface JuspContext
getContextBaseURI
public java.lang.String getContextBaseURI()
- Specified by:
getContextBaseURI
in interface JuspContext
getUriAndPath
public java.lang.String[] getUriAndPath(java.lang.Object request)
invoke
public void invoke(java.lang.String uri,
java.lang.String refUri,
java.lang.String refFilePath,
JuspRequest request,
JuspResponse response,
javax.servlet.http.HttpSession session,
java.lang.Object form,
java.lang.Object error)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
invoke
in interface JuspContext
- Throws:
javax.servlet.ServletException
java.io.IOException
forward
public void forward(java.lang.String uri,
java.lang.String refUri,
java.lang.String refFilePath,
JuspRequest request,
JuspResponse response,
javax.servlet.http.HttpSession session,
java.lang.Object form,
java.lang.Object error)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
forward
in interface JuspContext
- Throws:
javax.servlet.ServletException
java.io.IOException
redirect
public void redirect(java.lang.String uri,
JuspResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
redirect
in interface JuspContext
- Throws:
javax.servlet.ServletException
java.io.IOException
error
public void error(JuspRequest request,
JuspResponse response,
javax.servlet.http.HttpSession session,
java.lang.Throwable ex)
throws javax.servlet.ServletException,
java.io.IOException
- Specified by:
error
in interface JuspContext
- Throws:
javax.servlet.ServletException
java.io.IOException