Kevin:
Someone responded to me (but I don't think to the list) that this usually
arises when issuing a POST, while your class only implements the doGet()
method (or, issuing a GET when your class only implements the doPost()).
I have fixed this (only temporarily, 'til I get a better handle on all this
stuff) by putting a doGet() method in my controllerServlet that simply
calls doPost(). In the future I will implement Craig's suggestion of
redirecting doGet() to an error page....
HTH,
Mike
At 3/29/2000 12:33 PM -0800, Kevin Duffey wrote:
>Hi,
>
>I too am having a similar problem. All .do are mapped to my
>ControllerServlet, and as soon as I hit the submit button, instantly it
>tells me the method is not allowed error. I posted about this earlier as
>well.
>
>Any help would be great in resolving this. Thanks.
ps: I've copied some of Craig's earlier response below:
>
> I do have another concern though. What happens if someone bookmarks the
> Enroll.do URL, and then goes back to it? Wont it try to enroll them by going
> to the servlet, but without any form data? What to do in this case?
>
Well, one thing you could do in the action procedure that Enroll.do executes is
make sure the request method was a POST. That way, an attempt to do a GET
(as a
result of returning from a bookmark) will fail. If this is generally the
case for
all action procedures (i.e. they MUST be processing a form), the simplest
thing to
do is implement only doPost() in your controller servlet -- have doGet() return
some nice error message saying that you can't return to this page.
Another thing you'll probably want to do is have the controller servlet (or the
servlet container if you're using 2.2 security) check for is a valid login
when a
*.do URL is requested. You'll probably want this anyway, to prevent malicious
attempts to bypass any security you've coded into the JSP pages themselves.
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - */
Michael H. La Budde email: [EMAIL PROTECTED]
Prosoft, Inc. phone: 414-860-6509
[EMAIL PROTECTED] fax: 414-860-7014
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - */
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets