Kevin,
Use attributes in the request or session scope.
-Richard
At 07:28 AM 8/14/2005, you wrote:
Hi
I want to trasnfer data from One action to another
using a form bean.
How can i access the form bean data in the second
action.
I have attached my struts config and action class.
The submitIndex forwards to result action.
But in result page i want to show data i have
populated in the ActionBean for the page.
What is the appropriate way to dispaly it on the
result page.
This does not work but was wondering why ??
or This works. Help is greatly appretiated. Thanks Navin
__________________________________ Do you Yahoo!? Yahoo! Mail - Find what
you need with new enhanced search. http://info.mail.yahoo.com/mail_250/* *
Created on Aug 14, 2005 * * TODO To change the template for this generated
file go to * Window - Preferences - Java - Code Style - Code Templates */
package com.loginapp; import javax.servlet.http.HttpServletRequest; import
javax.servlet.http.HttpServletResponse; import
org.apache.struts.action.Action; import
org.apache.struts.action.ActionForm; import
org.apache.struts.action.ActionForward; import
org.apache.struts.action.ActionMapping; /** * @author navin.shenoy * *
TODO To change the template for this generated type comment go to * Window
- Preferences - Java - Code Style - Code Templates */ public class
IndexAction extends Action { /* (non-Javadoc) * @see
org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping,
org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) */ public ActionForward
execute(ActionMapping mapping, ActionForm form, HttpServletRequest
request, HttpServletResponse response) throws Exception { IndexForm
indexForm=(IndexForm)form; System.out.println(indexForm); ResultForm
result=new ResultForm(); result.setName("aaa");
request.getSession().setAttribute("resultForm" ,result); return
mapping.findForward("success"); } } <?xml version="1.0"
encoding="ISO-8859-1" ?>
--------------------------------------------------------------------- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]