wood burning stoves*
The moose likes JSP and the fly likes How do I retrieve and display output from a processing page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How do I retrieve and display output from a processing page?" Watch "How do I retrieve and display output from a processing page?" New topic
Author

How do I retrieve and display output from a processing page?

Kix Villalon
Greenhorn

Joined: Jul 19, 2003
Posts: 2
Dear all,
I am a neophyte to Java and the IT world, and my school project involves a simple ordering catalog site. What I'm trying to do is generate an order number for a shopper that wants to purchase a product/products from my list. I have no more problems with order generations because I am reusing a bean that interacts with the database. My problem is, when I have saved an order to the database, retrieved the details through a processing page, I always get a NullPointerException upon invocation of the response.sendRedirect() method. This mechanism that I want to use is to display whatever details that I retrieved from my processing page to my add-to-cart page as an output. I can say that there is no problem with my bean because if I try to retrieve the current details from the DB and display it on the process page itself(which is not right because my processing page is supposed to be a background page only), it does work. I guess it's because of my sendRedirect() thing that leaks. Please helppp!


I'm beginning to love Java!
Michal Bienek
Greenhorn

Joined: Jun 17, 2002
Posts: 29
The jsp page (processing or not) does not handle the response. You will always be referring to and modifying the HTTPRequest. You do not want to be performing a sendRedirect anyway, since everything from your request would be removed from the request.
What it seems you want to do is put your data into the request, and do a jsp:forward to your second page.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I retrieve and display output from a processing page?
 
Similar Threads
Setting session bean values from java classes.
Can we use Map for accessing data from database.
Displaying total Number of columns in Datatable
Pagination using the database(DB2)
How to store bean data into a JSP variable?