aspose 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
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: 60057
    
  65

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
 
Similar Threads
Passing a list of beans to jsp
Forwarding data to jsp from servlet
Display data from database to jsp page.
How to display sum of numbers from a java class to a jsp using custom tag?
Number Format Exception