changing url in struts
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   charlie_hwang
Posted On:   Wednesday, November 10, 2004 02:00 PM

I was wondering if there was a way to show the url with parameters passed to it in Struts. Let's say I have an Action named "Action" and in the Action.java class I've tried to change the path of the ActionForward such as so: success = new ActionMapping( success.getPath() + "?paramA=valueA", success.getRedirect() ) ; This sets the new path to http://website.com/path/output.jsp?paramA=valueA. The url in the webbrowser of course does not change from http://website.com/Action.do What I want is to have the user be able to bookmark the state, so that they can get back to that same page again. How do I set the url in the webbrowser to be: http://web.com/Action.do?paramA=valueA    More>>


I was wondering if there was a way to show the url with
parameters passed to it in Struts. Let's say I have an Action named "Action" and in the Action.java class I've tried to change the path of the ActionForward such as so:

			
success = new ActionMapping( success.getPath() + "?paramA=valueA", success.getRedirect() ) ;



This sets the new path to http://website.com/path/output.jsp?paramA=valueA. The url in the webbrowser of course does not change from http://website.com/Action.do What I want is to have the user be able to bookmark the state, so that they can get back to that same page again. How do I set the url in the webbrowser to be: http://web.com/Action.do?paramA=valueA




I apologize if I do not know all the correct terminology as I am very new to Struts.


Thanks for your help!


charlie    <<Less

Re: changing url in struts

Posted By:   charlie_hwang  
Posted On:   Thursday, November 18, 2004 02:46 PM

Ahhs... nevermind. It's me who doesn't know much about HTML. You can only modify parameters through the client side not server side. I'm guessing you could use the Servlet Unit testing framework to set the parameters if you wanted to.

charlie
About | Sitemap | Contact