Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp-vector

 
Duray Rajesh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
How can i forward vector from one jsp to another?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Putting it in the request before forwarding, using request.setAttribute ?
 
Bk Jacky
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
There is number of ways you can forward vector from one jsp page to another.check your case from following statemets:

If you want your vector scope is limied to request then use
request.setAttribute("name",vector object);
then use request dispatcher to forward the request
and use
request.getAttribute("name");
If you want your vector available for whole session then use

session.setAttribute("name",vector object);

Get this vector in your required jsp page by

session.getAttribute("name");

If you want your vector available for whole web-app then use

getSerletContext().setAttribute("name",vector object);

Get this vector in your required jsp page by

getSerletContext().session.getAttribute("name");

Bhupinder Singh
SCJP1.4
Preparing SCWCD

Nothing is impossible in this World
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic