File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

How to allow only Post method in Struts

Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166

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

[ 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

Marc Peabody
pie sneak

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.
It is sorta covered in the JavaRanch Style Guide.
subject: How to allow only Post method in Struts
Similar Threads
Learning JDBC
passed scwcd with 85%
Using struts and complex forms
how to set a ArrayLIst property of form from jsp
* Welcome Mark Cade & Humphrey Sheil