|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.util.MethodInvocationServlet
public class MethodInvocationServlet
A servlet used to generically call a method on a particular class by passing the CLASS_PARAMETER or OBJECT_PARAMETER. One of the CLASS_PARAMETER or OBJECT_PRARMETER is required, but not both. OBJECT_PARAMETER is required if invoking a method on a class instance. CLASS_PARAMETER is used for invoking static methods. If not specified explicitly then the method invoked will be of the form servletInvocationMethod(HTTPRequest, HTTPResponse). If a method name is specified via the METHOD request parameter then it will use that parameter value with a signature of (HTTPRequest, HTTPResponse)
To set the character encoding that will be set on the servlet's response, then you can place the character encoding to be used on the request object or the session. The attribute name of the key used is the String com.sas.web.keys.ComponentKeys.CHARACTER_ENCODING. The order of preference is the request and then the session. If you do not set the character encoding, then the ComponentPropertyManager.getOutputCharacterEncoding() will be used. The default value on the ComponentPropertyManager is UTF-8.
Field Summary | |
---|---|
static java.lang.String |
CLASS_PARAMETER
The name of the class for which the method is to be called. |
static java.lang.String |
METHOD_PARAMETER
The name of the method to call on the specified class. |
static java.lang.String |
OBJECT_PARAMETER
The name of the object to be searched in the page context using the javax.servlet.jsp.PageContext.findAttribute method. |
static java.lang.Class[] |
PARAMS
Represents the methods parameter array. |
Constructor Summary | |
---|---|
MethodInvocationServlet()
|
Method Summary | |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
doGet() Respond to the Get message. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
doPost() Respond to the Post message. |
Field Detail |
---|
public static final java.lang.String CLASS_PARAMETER
public static final java.lang.String METHOD_PARAMETER
public static final java.lang.String OBJECT_PARAMETER
public static final java.lang.Class[] PARAMS
Constructor Detail |
---|
public MethodInvocationServlet()
Method Detail |
---|
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
request
- The HttpServletRequestresponse
- The HttpServletResponse
javax.servlet.ServletException
java.io.IOException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
request
- The HttpServletRequestresponse
- The HttpServletResponse
javax.servlet.ServletException
java.io.IOException
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |