|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.action.Action
jp.terasoluna.fw.web.struts.actions.ActionEx
jp.terasoluna.fw.web.struts.actions.MakeSessionDirectoryAction
public class MakeSessionDirectoryAction
Action that creates session directory.
Session directory is a temporary directory to save the files (PDF etc.) generated at server side.
This action creates session directory for each logon user.
To use this function, it is necessary to specify the session directory path in the system configuration property file(system.properties).
session.dir.base=/tmp/sessions
Session directory can be created with the following two methods.MakeSessionDirectoryAction
class
<action path="/makeSessionDir"
scope="session"
parameter="/foo.jsp">;
</action>
<bean name="/makeSessionDir" scope="prototype"
class="jp.terasoluna.fw.web.struts.actions.MakeSessionDirectoryAction">
</bean>
(2)Create session directory directly in the action classHttpSession
can be fetched after the user login. HttpSessionListener
implementation class
<web-app>
...
<listener>
<listener-class>
jp.terasoluna.fw.web.MyHttpSessionListener
</listener-class>
</listener>
</web-app>
Field Summary | |
---|---|
private static java.lang.String |
FORWARD_ERRORPAGE_ERROR
Error page(404) Error code indicating the transition failure. |
private static org.apache.commons.logging.Log |
log
Log class. |
private static java.lang.String |
SESSION_NOT_FOUND_ERROR
Error code indicating the failure to fetch the session. |
Fields inherited from class jp.terasoluna.fw.web.struts.actions.ActionEx |
---|
FORWARD_TXTOKEN_ERROR |
Fields inherited from class org.apache.struts.action.Action |
---|
defaultLocale, servlet |
Constructor Summary | |
---|---|
MakeSessionDirectoryAction()
|
Method Summary | |
---|---|
org.apache.struts.action.ActionForward |
doExecute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Generates the session directory. When it is possible to fetch the session, it creates the session directory, returns the action forward set with the value (destination page) of "Parameter" attribute. When the "parameter" attribute is not set, returns the error (404). Generates system exception when unable to fetch the session. |
Methods inherited from class jp.terasoluna.fw.web.struts.actions.ActionEx |
---|
addErrors, addMessages, execute, isSaveToken, isTokenCheck, processTokenCheck, setSaveToken, setTokenCheck |
Methods inherited from class org.apache.struts.action.Action |
---|
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.commons.logging.Log log
private static final java.lang.String SESSION_NOT_FOUND_ERROR
private static final java.lang.String FORWARD_ERRORPAGE_ERROR
Constructor Detail |
---|
public MakeSessionDirectoryAction()
Method Detail |
---|
public org.apache.struts.action.ActionForward doExecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
Generates session directory.
When it is possible to fetch the session, it creates the session directory, returns the action forward set with the value (destination page) of "Parameter" attribute.
When the "parameter" attribute is not set, returns the error (404).
Generates system exception when unable to fetch the session.
doExecute
in class ActionEx
mapping
- Action mappingform
- Action formreq
- HTTP requestres
- HTTP response
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |