struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jouravlev <>
Subject Re: HTTP method for action-mappings
Date Tue, 05 Jul 2005 17:55:23 GMT
At 7:11 PM +0100 7/4/05, Miles, AJ \(Alistair\) wrote:
>Hi all,
>A struts-config.xml file is a great way to formally specify a REST
>API.  However, with struts 1.2 you cannot configure separate action
>mappings for GET vs POST requests to the same resource.  What about
>adding a 'method' attribute to the 'action' element?

I differentiate between POST and GET in the my Struts Dialogs library.
I need to separate input submitted with POST, from rendering request
which has GET type. So I have this simple method:

 * Returns true if request is considered "input" request. 
 * By convention dialog input is sent via POST, result page 
 * is loaded via GET.
 * @param request The HTTP request we are processing
 protected boolean isInput(HttpServletRequest request) {
   return "POST".equalsIgnoreCase(request.getMethod());


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message