|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.restafarian.core.servlets.JavascriptServletBase
public abstract class JavascriptServletBase
This is the base class for all of the Javascript servlets.
| Field Summary | |
|---|---|
protected javax.servlet.ServletContext |
context
|
protected org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
JavascriptServletBase()
|
|
| Method Summary | |
|---|---|
abstract void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
The Servlet "doGet()" method. |
protected static java.lang.String |
filter(java.lang.String value)
Filter the specified string for characters that are sensitive to HTML interpreters, returning the string with these characters replaced by the corresponding character entities. |
protected java.lang.String |
getIdFromUrl(javax.servlet.http.HttpServletRequest req,
java.lang.String servletPath)
Returns the id present in the URL, if any. |
protected java.lang.String |
getNameSpaceUrl(javax.servlet.http.HttpServletRequest req)
Returns the name space url. |
protected void |
sendError(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
int errorCode,
java.lang.String errorMessage)
Sends the HTTP error code and message, and logs the code and message if enabled. |
protected void |
sendError(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
int errorCode,
java.lang.String errorMessage,
java.lang.Throwable throwable)
Sends the HTTP error code and message, and logs the code and message if enabled. |
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
The Servlet "service" method. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, 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 |
|---|
protected javax.servlet.ServletContext context
protected org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public JavascriptServletBase()
| Method Detail |
|---|
public void service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
The Servlet "service" method.
service in class javax.servlet.http.HttpServletreq - the HttpServletRequest objectres - the HttpServletResponse object
javax.servlet.ServletException
java.io.IOException
public abstract void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
The Servlet "doGet()" method.
doGet in class javax.servlet.http.HttpServletreq - the HttpServletRequest objectres - the HttpServletResponse object
javax.servlet.ServletException
java.io.IOException
protected java.lang.String getIdFromUrl(javax.servlet.http.HttpServletRequest req,
java.lang.String servletPath)
Returns the id present in the URL, if any.
req - the HttpServletRequest objectservletPath - the path to the servlet, including both the leading and trailing "/"
protected java.lang.String getNameSpaceUrl(javax.servlet.http.HttpServletRequest req)
Returns the name space url.
req - the HttpServletRequest object
protected static java.lang.String filter(java.lang.String value)
value - The string to be filtered and returned
protected void sendError(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
int errorCode,
java.lang.String errorMessage)
throws java.io.IOException
Sends the HTTP error code and message, and logs the code and message if enabled.
req - the HttpServletRequest objectres - the HttpServletResponse objecterrorCode - the error code to senderrorMessage - the error message to send
java.io.IOException
protected void sendError(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
int errorCode,
java.lang.String errorMessage,
java.lang.Throwable throwable)
throws java.io.IOException
Sends the HTTP error code and message, and logs the code and message if enabled.
req - the HttpServletRequest objectres - the HttpServletResponse objecterrorCode - the error code to senderrorMessage - the error message to sendthrowable - an optional exception
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||