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()); } Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]