wood burning stoves 2.0*
The moose likes Struts and the fly likes Depatch Action query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Depatch Action query" Watch "Depatch Action query" New topic
Author

Depatch Action query

Dushyant Agarwal
Ranch Hand

Joined: Oct 14, 2007
Posts: 75
Hi all,
Am relatively new to Struts. Am using version 1.3. I have a security issue, where I need to stop from sending anything in the query string. Now I have been told that if we are using Dispatch Action (which is my case) we have to pass the method name of the in the query string, i.e. the query string is going to look like
http://<url>/<formName>.do?method=myActionMethod. Is it true that we can not work with DispatchAction withput sending the method name in the query string?
If there is another way of doing this please let me know.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have you read the Javadocs for DispatchAction? They answer your question.
Dushyant Agarwal
Ranch Hand

Joined: Oct 14, 2007
Posts: 75
Hi David,
I went through the javadoc . Not sure what you wanted me to find out.
I asked if there was a way of not sending the method name in the query string. May be in some other context or some other way in struts.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You asked if there was a way to work with DispatchAction without sending the method name in the query string.

NOTE - If the value of the request parameter is empty, a method named unspecified is called. The default action is to throw an exception. If the request was cancelled (a html:cancel button was pressed), the custom handler cancelled will be used instead. You can also override the getMethodName method to override the action's default handler selection.

You didn't specify what you wanted to do. The answer to your original question is yes, and the docs show how.
Dushyant Agarwal
Ranch Hand

Joined: Oct 14, 2007
Posts: 75
You didn't specify what you wanted to do

I want to carry out navigation from one page to another in struts but without using query parameter for passing the action method name.
You can also override the getMethodName method to override the action's default handler selection.

I could not get "getMethodName() " method in the documentation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Depatch Action query