Let's say i have a struts-config.xml file, putting action tag only :
</action>
<action path="/import"
type="com.app.console.CSVAction"
scope="session"
name="formName"
input="/example.jsp"
validate="true">
<forward name="success" path="/myAction.do?subAction=import"/>
</action>
I am asking this question because in my code.. the actionform is getting reset always(where all bean properties will be reset) corresponding to myAction.do, when i call the action myAction.do above.
Please provide the detailed explanation.
path
attribute defines the URL of the action. reset
is always called by the framework, as per the documentation. Reset is almost only for initial checkbox values to work around how HTTP/clients handle unchecked checkboxes. Please consider reading some Struts 1 documentation.
If you specify redirect="true", Struts uses a client-side redirect [
response.sendRedirect()].
The JSP will be invoked by a new browser request, and any data stored in the old request will be lost.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.