wood burning stoves 2.0*
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


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.
 
GeeCON Prague 2014
 
subject: How do I retrieve and display output from a processing page?