Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing variables to jsps

 
shruti patel
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How you did you answer this question in your interview?
 
Sidharth Pallai
Ranch Hand
Posts: 134
Hibernate Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic