File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Modify struts url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Modify struts url" Watch "Modify struts url" New topic
Author

Modify struts url

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Is it possible to take a query parameter and place it on a url that gets displayed to the user?

For example, if I normally display this to my user: http://www.myapp.com/myaction.do

and i have a hidden field populated from my actionform called test with a value of 123, I would rather have the url appear as

http://www.myapp.com/myaction.do?test=123

Thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Originally posted by Andy Hahn:
Is it possible to take a query parameter and place it on a url that gets displayed to the user?

Yes, it is. Just insert method="get" in your html:form tag. This will cause all form fields to be displayed as parameters in the query string. The problem is that it's all or nothing. You can't display some fields in the query string and hide others.


Merrill
Consultant, Sima Solutions
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Perfect! I understand there are some limitations with using GET versus POST, such as length of urls submitted. Do you know the max size of Tomcat5.5 and web browsers, as well as any other related drawback under struts1.3.8?

Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Modify struts url
 
Similar Threads
Web applications with references to another web application
// (double slash) problem in redirect forward with weblogic
method returns server host
sending sendRedirect() into an infinite loop
Spring security intercept-url question