This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Originally posted by Kevin DesLauriers: . . . I am configuring the struts-config.xml file to forward to a particular page and it does with the path's original url as expected with a forward. . .
Currently the page is static. I am using a link on the page to update a database and then return back to the same page.
The page is jsp/home.jsp and it has a link to update.do that is mapped to a class in the struts config. When it returns success it is supposed to forward back to the same page "home.jsp" (for now).
It words except that when I return to the home.jsp page it shows update.do and I would much rather it show home.jsp in the address bar.
Thanks
Akhilesh Trivedi
Ranch Hand
Joined: Jun 22, 2005
Posts: 1493
posted
0
I simply dont get why you want to change the URL in address-bar ? :roll:
Kevin DesLauriers
Ranch Hand
Joined: Nov 28, 2005
Posts: 43
posted
0
It is not that I want to change the URL in the address bar; I would just rather it reflect the page it is displaying instead of a fake .do name that is used to send a request to a particular action class.
Ex.
A user is on the /jsp/home.jsp page and has the option of refreshing data in the database by clicking a button or link. When this is done I want the user to be forwarded to the same page /jsp/home.jsp and have the URL in the address bar reflect that they are at /jsp/home.jsp not /stats.do.
Originally posted by Kevin DesLauriers: When this is done I want the user to be forwarded to the same page /jsp/home.jsp and have the URL in the address bar reflect that they are at /jsp/home.jsp not /stats.do.
Then in that case you would redirect to that URL instead of forwarding to it. But if you do that, the user can bookmark that URL and go directly to it at some time in the future. This is a feature, not a bug, so if it doesn't make sense for the user to go directly to that URL then you shouldn't expose it to the user in the way you are proposing.
Kevin DesLauriers
Ranch Hand
Joined: Nov 28, 2005
Posts: 43
posted
0
Much appreciated! I will make the change in my design.