wood burning stoves 2.0*
The moose likes JSP and the fly likes jsp-vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp-vector" Watch "jsp-vector" New topic
Author

jsp-vector

Duray Rajesh
Greenhorn

Joined: Jun 16, 2006
Posts: 12
hi,
How can i forward vector from one jsp to another?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Putting it in the request before forwarding, using request.setAttribute ?


[My Blog]
All roads lead to JavaRanch
Bk Jacky
Ranch Hand

Joined: Jun 11, 2005
Posts: 74
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


SCJP1.4<br />SCWCD1.5<br />"Nothing is impossible"
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jsp-vector