GeeCON Prague 2014*
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


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.
 
GeeCON Prague 2014
 
subject: How to allow only Post method in Struts