File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Recursive post to same jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Recursive post to same jsp" Watch "Recursive post to same jsp" New topic

Recursive post to same jsp

kvvinaykv krishna

Joined: Jan 30, 2007
Posts: 2
i have main.jsp, work.jsp, result.jsp
main.jsp sows the startup page & a button "Start Query>>" takes to work.jsp
work.jsp contains a combo box . based on selected option some more combo box is shown in the same jsp. i.e it is recursive posting into the same jsp...
by doing this i have problems with refresh & back button..
when the user hits "Submit" button it loads result.jsp..
please suggest a alternative design or solution for this
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1323

hi Krishna,
Welcome to JavaRanch,
I didn't get what you trying to do.. are you stop the user to submit before selected all the combo box or ??

implement some javascript validation code on work.jsp to prevent the user to go to result page without selecting the required values from combo boxes.

hope it helps.

[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
kvvinaykv krishna

Joined: Jan 30, 2007
Posts: 2
work.jsp recursively posts to itself based on selected combo boxes & list boxes. here i am having trouble with back button. when user goes back an Exception is raised application has to be started from the first. i am not able to thikn of a way to work with back button.
Abdulla Mamuwala
Ranch Hand

Joined: Jan 09, 2004
Posts: 225
hey krishna, I would suggest that once you come to the work.jsp page store that information in a session variable. The session variable could be a simple string which would unable you to know during the course of the application that you have aldready visited the work.jsp page. I hope this helps or sounds feasible to you.
I agree. Here's the link:
subject: Recursive post to same jsp
It's not a secret anymore!