Folks

Thanks for your replies
I tried using request.setAttribute(), but the HttpServletRequest instance
changes between Login.jsp and the login action. The  instance that Login.jsp
stores the params in is not the same instance that is passed into the login
action. Hence he params are not present in the login action.


The param I want to pass is a Map of name/value pairs.


Maybe the standard solution is to just put it in the session?


TIA -Adam



-----Original Message-----
From: HG [mailto:[EMAIL PROTECTED] 
Sent: 30 September 2004 12:32
To: Struts Users Mailing List
Subject: Re: NEWBIE: How to pass parameters between JSPs


Hi Andy

A session variable can be "expensive". Why not just put it on the request by
using "request.setAttribute" in one action and getting it again using
"request.getAttribute" in another action?

What is your "parameter"? A simple type, object, graph of objects?




----- Original Message ----- 
From: "andy wix" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 30, 2004 1:03 PM
Subject: NEWBIE: How to pass parameters between JSPs


> Hi,
>
> It's probably better to store them in the session rather then passing 
> from page to page. In Login action:
>
>         HttpSession session = request.getSession();
>          session.setAttribute("YourParams", params);
>
> and get them in the next page:
>
>          YourClass xxx = 
> (YourClass)session.getAttribute("YourParams");
>
> regards,
> Andy
>
> _________________________________________________________________
> Express yourself with cool new emoticons
http://www.msn.co.uk/specials/myemo
>
>
> ---------------------------------------------------------------------
> 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]



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

Reply via email to