This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes How to allow only Post method in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to allow only Post method in Struts" Watch "How to allow only Post method in Struts" New topic
Author

How to allow only Post method in Struts

Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
Hi

How can we allow only Post method in Struts. I want to disable Get method.
any examples or useful links for this...

Rgds,
Sudheer
[ October 21, 2005: Message edited by: sudheer yed ]

A Moment's insight is sometimes worth a Life's experience.
Wagner Danda Da Silva Filho
Ranch Hand

Joined: Mar 21, 2003
Posts: 80
Hi, look at the web for Extending struts RequestProcessor. You might find in this class a "doGet" method or something similar...

Wagner Danda


SCJP, SCWCD
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

I think you can set such a constraint from the web.xml. It allows you to specify http-method for a security-constraint.


A good workman is known by his tools.
 
 
subject: How to allow only Post method in Struts