File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes passing values from servlets to jsp page via request.getRequestDispatcher method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "passing values from servlets to jsp page via request.getRequestDispatcher method" Watch "passing values from servlets to jsp page via request.getRequestDispatcher method" New topic
Author

passing values from servlets to jsp page via request.getRequestDispatcher method

Vivek Kr Agrawal
Ranch Hand

Joined: Sep 08, 2012
Posts: 51

I am trying to fetch a bean object from database(which is working fine) in a servlet and passing it to a jsp page. My code in servlet is as:


My read_liability_proposal.jsp page looks like



I am getting null everywhere except for Proposal Id.


Vivek Agrawal
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Point #1: You should be using the EL in your JSP pages, not scriptlet expressions. See this JspFaq entry.

Point #2: You don't fetch scoped variables with getParameter(); you use getAttribute() -- the fact that you set them with setAttribute() should be a clue.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vivek Kr Agrawal
Ranch Hand

Joined: Sep 08, 2012
Posts: 51


Thanks...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing values from servlets to jsp page via request.getRequestDispatcher method