Hi Bhashkar,

You don't "have to" replace the reference if you don't want, but if you want
everything to run through the Struts controller, you should.  There are a
couple of ways pass URL parameters from jsp1 to jsp2 via Struts, but here's
how I do it:


In jsp1, replace the URL reference to jsp2 with a URL reference to an Action
class's mapped URL (as defined in the actionmapping in struts-config.xml)
instead.  The Action class retrieves the parameter values and sets them as
field values in an ActionForm bean associated with jsp2.  You can then
easily retrieve them from this ActionForm in jsp2 using Struts' custom tags.




-----Original Message-----
From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 3:50 PM
To: [EMAIL PROTECTED]
Subject: Communication between JSPs


Hi,
I'm new to struts and have this silly question:

My code does not use struts currently. From JSP1, I call another JSP2 using
the "action" and I also pass parameters. Now, I want to incorporate struts
in my code. So, do I have to replace the reference to jsp2 by action class?
If so, how do i pass parameters from jsp1 to jsp2 thru action1?

Thanks,
Bhaskar

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to