aspose file tools*
The moose likes JSP and the fly likes refreshing page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "refreshing page" Watch "refreshing page" New topic
Author

refreshing page

Jyoti Jadhav
Greenhorn

Joined: Nov 15, 2007
Posts: 18
in jsp page(enter_product_data.jsp) i am entering product details and on submit i am checking product id for duplicate records and if product id exists in database i am showing a page having error message.

for coming from servlet to error message page i used requestdiapatcher's forward method.

that page contains back button.

back button onclick i wrote script.
function backgo()
{
document.form1.action="enter_product_data.jsp"
document.form1.submit()
}

but when i come to this enter_product_data.jsp page again i want all the datails as it is.what is the way to get it.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30309
    
150

Jyoti,
The best way is to store the values in the HttpSession before going to the error page. That way the next time you paint the JSP, they are available to you.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jyoti Jadhav
Greenhorn

Joined: Nov 15, 2007
Posts: 18
Originally posted by Jeanne Boyarsky:
Jyoti,
The best way is to store the values in the HttpSession before going to the error page. That way the next time you paint the JSP, they are available to you.


Hey Jeanne,

Thanks a lot..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: refreshing page