Hi,
 
Typically in the past when I have written my own controller servlets, I delegate from the doPost & doGet methods to a process() method much like the Struts ActionServlet.  The difference however is that the method signature for my process method includes a boolean to indicate whether or not the request originated as a GET or POST:
 
    public void process(HttpServletRequest req, HttpServletResponse res, boolean isPost) ...
 
This way the framework does not hide that info from the user.  Maybe a future release of struts can incorporate this simple change?
 
JR
-----Original Message-----
From: Spencer Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 9:35 AM
To: [EMAIL PROTECTED]
Subject: Re: POST and GET method

That's a good question.  If you guys find out let me know and I will do the same.  I actually have to deal with that today in a multi-part form.  I am not sure, but I think the answer is by adding struts hidden form fields.  I'll let you know later today.
----- Original Message -----
From: kiatkin
Sent: Thursday, March 01, 2001 12:05 AM
Subject: POST and GET method

Hi,
 
Anyone know how to set an action class to process the POST request only. So that when user try to access www.abc.com/action.do?action=doGET. It can redirect user to error page. Or put in this way, how do action class react differently for each doGet and doPost request?
 
regards,
Kiat Kin 

Reply via email to