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 struts action get method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts action get method" Watch "struts action get method" New topic
Author

struts action get method

Joshua Elkino
Ranch Hand

Joined: Jul 24, 2007
Posts: 91
is there a way to set the struts action bean so that i works with the get method and not just the post?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You'd have to check the submission type manually; there's nothing like that built in to either S1 or S2.
Joshua Elkino
Ranch Hand

Joined: Jul 24, 2007
Posts: 91
Where can i perform this check? It doesn't look there are any useful methods i can override for Action like i could on a servlet doPost, doGet.. other than execute. I don't think it even reaches that point if i try to submit using get.

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

In S1 I always used a base class that checked the submission type: since all my form submissions were POST back in those days that was okay, and I just called validate manually. In S2 I've used an interceptor to perform the same functionality.

(It's easier to say which version of Struts you're asking about, that way people don't have to guess or provide twice as much information as is probably needed.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts action get method
 
Similar Threads
struts
ActionForm class
what's the default action method for struts' html:form ?
Regarding Query String
web.xml and Struts 2