wood burning stoves 2.0*
The moose likes Servlets and the fly likes Newbie -- Passing bean information while redirecting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Newbie -- Passing bean information while redirecting" Watch "Newbie -- Passing bean information while redirecting" New topic
Author

Newbie -- Passing bean information while redirecting

Vedprakash Pathak
Greenhorn

Joined: Mar 06, 2001
Posts: 24
Can I pass bean information to another page I am calling from within the servlet.

response.sendRedirect("myPage.jsp");

If yes then how do I read that bean in the jsp page.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12760
    
    5
I think you will have to attach the bean to the session.
sendRedirect does NOT call the redirect url directly, it is a command to the browser to go to the new url.
Bill
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
And maybe call before sendRedirect()? Is this always necessary?


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
 
wood burning stoves
 
subject: Newbie -- Passing bean information while redirecting
 
Similar Threads
Error In EJB
transfer Bean between JSP and backend
MVC Design
Getting input in JSP page
help---please