|
||||||||||
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.kohsuke.stapler.Stapler
public class Stapler
Maps an HTTP request to a method call / JSP invocation against a model object by evaluating the request URL in a EL-ish way.
This servlet should be used as the default servlet.
Field Summary | |
---|---|
static org.apache.commons.beanutils.ConvertUtilsBean |
CONVERT_UTILS
This is the Converter registry that Stapler uses, primarily
for form-to-JSON binding in StaplerRequest.bindJSON(Class, JSONObject)
and its family of methods. |
Constructor Summary | |
---|---|
Stapler()
|
Method Summary | |
---|---|
void |
forward(javax.servlet.RequestDispatcher dispatcher,
StaplerRequest req,
javax.servlet.http.HttpServletResponse rsp)
|
java.lang.ClassLoader |
getClassLoader()
Deprecated. Use WebApp.getClassLoader() |
static java.lang.ClassLoader |
getClassLoader(javax.servlet.ServletContext context)
Deprecated. Use WebApp.getClassLoader() |
static Stapler |
getCurrent()
Gets the current Stapler that the calling thread is associated with. |
static StaplerRequest |
getCurrentRequest()
Gets the current StaplerRequest that the calling thread is associated with. |
static StaplerResponse |
getCurrentResponse()
Gets the current StaplerResponse that the calling thread is associated with. |
static java.lang.String |
getViewURL(java.lang.Class clazz,
java.lang.String jspName)
Gets the URL (e.g., "/WEB-INF/side-files/fully/qualified/class/name/jspName") from a class and the JSP name. |
WebApp |
getWebApp()
|
void |
init(javax.servlet.ServletConfig servletConfig)
|
void |
invoke(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp,
java.lang.Object root,
java.lang.String url)
Performs stapler processing on the given root object and request URL. |
static org.apache.commons.beanutils.Converter |
lookupConverter(java.lang.Class type)
|
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp)
|
static void |
setClassLoader(javax.servlet.ServletContext context,
java.lang.ClassLoader classLoader)
Deprecated. Use WebApp.setClassLoader(ClassLoader) |
static void |
setRoot(javax.servlet.ServletContextEvent event,
java.lang.Object rootApp)
Sets the specified object as the root of the web application. |
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 |
Field Detail |
---|
public static final org.apache.commons.beanutils.ConvertUtilsBean CONVERT_UTILS
Converter
registry that Stapler uses, primarily
for form-to-JSON binding in StaplerRequest.bindJSON(Class, JSONObject)
and its family of methods.
Constructor Detail |
---|
public Stapler()
Method Detail |
---|
public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public WebApp getWebApp()
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp) throws javax.servlet.ServletException, java.io.IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void invoke(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, java.lang.Object root, java.lang.String url) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
public void forward(javax.servlet.RequestDispatcher dispatcher, StaplerRequest req, javax.servlet.http.HttpServletResponse rsp) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public static java.lang.String getViewURL(java.lang.Class clazz, java.lang.String jspName)
public static void setRoot(javax.servlet.ServletContextEvent event, java.lang.Object rootApp)
This method should be invoked from your implementation of
ServletContextListener.contextInitialized(ServletContextEvent)
.
This is just a convenience method to invoke
servletContext.setAttribute("app",rootApp)
.
The root object is bound to the URL '/' and used to resolve all the requests to this web application.
public static void setClassLoader(javax.servlet.ServletContext context, java.lang.ClassLoader classLoader)
WebApp.setClassLoader(ClassLoader)
StaplerRequest.bindJSON(Class, JSONObject)
and its sibling methods.
public static java.lang.ClassLoader getClassLoader(javax.servlet.ServletContext context)
WebApp.getClassLoader()
public java.lang.ClassLoader getClassLoader()
WebApp.getClassLoader()
public static StaplerRequest getCurrentRequest()
StaplerRequest
that the calling thread is associated with.
public static StaplerResponse getCurrentResponse()
StaplerResponse
that the calling thread is associated with.
public static Stapler getCurrent()
Stapler
that the calling thread is associated with.
public static org.apache.commons.beanutils.Converter lookupConverter(java.lang.Class type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |