aspose file tools*
The moose likes JSP and the fly likes passing variables to jsps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "passing variables to jsps" Watch "passing variables to jsps" New topic
Author

passing variables to jsps

shruti patel
Ranch Hand

Joined: Mar 10, 2008
Posts: 52
how can we pass a variable declared in one JSP to another JSP?

[edited subject to use a meaningful subject - was "interview question"]
[ May 18, 2008: Message edited by: Jeanne Boyarsky ]
kappiil patel
Greenhorn

Joined: Aug 06, 2006
Posts: 14
By putting that variale in session if you are maintianing it.
Second is that, you can pass variable as parameter after URL string and pass it to JSP
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

How you did you answer this question in your interview?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sidharth Pallai
Ranch Hand

Joined: Apr 21, 2008
Posts: 134

If you need to pass a value while a invoking a JSP, you can better use <jsp:param name="abc" value="xyz"/> embedded inside <jsp:include>.Or'else you can use a session to bind values.


Thanks & Regards
Sidharth Pallai
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: passing variables to jsps