Please help........JSP->Servlet->JSP
Hi all,
I got left menu in jsp page and when I click on links from there I go to a servlet and then return to the same page with different results.
My problem is with the browser, it seems that none history data saved, and when I click back the home page appears.
Any ideas?
Thanks in advance,
Sasi
[335 byte] By [
sasi2103a] at [2007-11-27 4:00:23]

# 2
I got in my home page search bar. When you click on search I call to a servlet to find data. Then I redirect it to results page. The results page contains menu and content. I build the content and the menu with the results.
In the menu you can click on a link and its own a href sent you to the servlet to search again information. The redirect of the last search will go back to the results page.
The problem is that if I press on the links in the menu I can't use the back of the browser.
Hope its clearly
# 4
Simple scenario:
1. You have a search bar. (like google search bar).
2. You put a keyword and press search.
3. You get NEW results page that contains menu on ur left side of the page (like here in Sun Forums), and the results of the search on ur right side of the page.
4. You click on the left menu.
5. The a href of the link go to servlet and get new data for you.
6. You get a results page again as describe in step 3.
7. You click again on the left menu and steps 5 and 6 occur again.
8. You click on the BACK button in the explorer.
9. The search bar appears of step 1 insteand of the previous page of step 4.
Hope that clear the question.
Thanks
# 5
Hm. Ok. Can you give some relevant code? The HTML code of the link and the part of the servlet that receives that link and sends the output perhaps?
Because I have not faced this behaviour and I have similar page flow.
Are you using Struts by any chance? Because I haven't worked with that yet....
# 6
I found the problem.
It looks like the browser not keep new page when the URI is the same.
For example:
If you have URL such as www.mydomain.com/search?id=2 and then you call the servlet and redirect again to www.mydomain.com/search?id=2 so the browser not save it, in other words the back button will send u back to the first page and not the older one.
Any way thanks for your help!