org.apache.struts.config
public class ConfigHelper extends Object implements ConfigHelperInterface
Since: Struts 1.1
Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
Field Summary | |
---|---|
ServletContext | application
The application associated with this instance. |
ActionForward | forward
The forward associated with this instance. |
HttpServletRequest | request
The request associated with this instance. |
HttpServletResponse | response
The response associated with this instance. |
HttpSession | session
The session associated with this instance. |
Constructor Summary | |
---|---|
ConfigHelper() | |
ConfigHelper(ServletContext application, HttpServletRequest request, HttpServletResponse response) |
Method Summary | |
---|---|
String | action(String path)
Wrapper for getAction(String)
|
String | getAction(String path)
Return the URL for the specified ActionMapping,
otherwise return null .
|
ActionForm | getActionForm() |
ActionForward | getActionForward(String name)
Return the forwarding associated with the specified logical name,
if any; otherwise return null .
|
ActionMapping | getActionMapping(String path)
Return the mapping associated with the specified request path, if any;
otherwise return null .
|
String | getActionMappingName(String action)
Return the form action converted into an action mapping path. |
String | getActionMappingURL(String action)
Return the form action converted into a server-relative URL. |
ActionMessages | getActionMessages() |
String | getBaseRef()
Renders the reference for a HTML |
DataSource | getDataSource()
The default
configured data source (which must implement
javax.sql.DataSource ),
if one is configured for this application. |
String | getEncodeURL(String url)
Return the url encoded to maintain the user session, if any. |
Throwable | getException()
The runtime JspException that may be been thrown by a Struts tag
extension, or compatible presentation extension, and placed
in the request. |
ActionFormBean | getFormBean(String name)
Return the form bean definition associated with the specified
logical name, if any; otherwise return null .
|
String | getLink(String name)
Return the path for the specified forward,
otherwise return null .
|
ActionMapping | getMapping()
The org.apache.struts.ActionMapping
instance for this request. |
String | getMessage(String key)
Return the localized message for the specified key,
otherwise return null .
|
String | getMessage(String key, Object[] args)
Look up and return a message string, based on the specified parameters.
|
MessageResources | getMessageResources()
The application resources for this application. |
MultipartRequestWrapper | getMultipartRequestWrapper()
The multipart object for this request. |
String | getOrigRef()
Renders the reference for a HTML |
String | getServletMapping()
The path-mapped pattern ( /action/* ) or
extension mapped pattern ((*.do )
used to determine our Action URIs in this application. |
String | getToken()
The transaction token stored in this session, if it is used. |
boolean | isMessage(String key)
Return true if a message string for the specified message key
is present for the user's Locale.
|
String | link(String name)
Wrapper for getLink(String)
|
String | message(String key)
Wrapper for getMessage(String)
|
String | message(String key, Object[] args)
Wrapper for getMessage(String,Object[])
|
void | setApplication(ServletContext application)
Set the application associated with this instance.
[servlet.getServletContext()] |
void | setForward(ActionForward forward)
Set the forward associated with this instance. |
void | setRequest(HttpServletRequest request)
Set the request associated with this object.
|
void | setResources(ServletContext application, HttpServletRequest request, HttpServletResponse response)
Set the application and request for this object instance.
|
void | setResponse(HttpServletResponse response)
Set the response associated with this isntance.
|
void | setSession(HttpSession session)
Set the session associated with this instance. |
Parameters: path Name given to local or global forward.
null
.
Parameters: path Name given to local or global forward.
null
.
Parameters: name Logical name of the requested forwarding
null
.
Parameters: path Request path for which a mapping is requested
action
property is manipulated as follows in
computing the name of the requested mapping:
javax.sql.DataSource
),
if one is configured for this application.null
.
Parameters: name Logical name of the requested form bean definition
null
.
Parameters: name Name given to local or global forward.
org.apache.struts.ActionMapping
instance for this request.null
.
Parameters: key Message key
Parameters: key Message key to be looked up and returned args Replacement parameters for this message
/action/*
) or
extension mapped pattern ((*.do
)
used to determine our Action URIs in this application.Parameters: key Message key
Parameters: name Name given to local or global forward.
Parameters: key Message key
Parameters: key Message key to be looked up and returned args Replacement parameters for this message
Parameters: application - The associated ServletContext. request - The associated HTTP request. response - The associated HTTP response.