aspose file tools*
The moose likes Servlets and the fly likes Http error status 405 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Http error status 405" Watch "Http error status 405" New topic
Author

Http error status 405

Sophia Choi
Ranch Hand

Joined: Mar 22, 2002
Posts: 106
I am trying a upload program which passes parameters to a servlet .
I have tried a long time but still not solve it.
Anyone knows how to do?
Thanks a lot.
The error is following:
HTTP Status 405 - HTTP method POST is not supported by this URL
message HTTP method POST is not supported by this URL
description The specified HTTP method is not allowed for the requested resource (HTTP method POST is not supported by this URL).
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 635
Hi,
If you have and have defined you form tag as ..<form action="....." method=post>
then your servle must have doPost method
Cheers
Praful


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Sophia Choi
Ranch Hand

Joined: Mar 22, 2002
Posts: 106
I did. What other possibilities? Does it relate to the servlet configuration?
Thanks
public void doPost(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException{
....
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

Wait a minute. Are you doing upload program?
Do you have in form header:
method="post" enctype="multipart/form-data"
?
Do you use apache or some other implementation to parse parameters?


Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
Sophia Choi
Ranch Hand

Joined: Mar 22, 2002
Posts: 106
of course, my jsp has the enctype like the following:
form name="form1" enctype="multipart/form-data" method="post"
onSubmit="return validateForm(this)" action="/cfhc/servlet/UploadTest"
The program can work in the office.In my office, I have the Tomcat 4.1 only.
But, this cannot work at home. I have installed IIS and Tomcat. But they are in different port.I have changed the port of Tomcat to 8081.
Is it the source of the problem?
 
 
subject: Http error status 405