This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Depatch Action query

 
Dushyant Agarwal
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the Javadocs for DispatchAction? They answer your question.
 
Dushyant Agarwal
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic