I inherited a ASP classic and Java application. The front end is ASP with Java applets and servlets in the back end. I am trying to set up a test environment in my desktop with the following: Windows XP, Apache Tomcat 5 and IIS. I have taken the code in our development environment and installed it on my desktop. I am able to get it to work partially. I keep getting the following message on trying to start the applet: "Server returned HTTP response code: 405 for URL: http://localhost/TEST/test1/claim."
I am aware that a response code of 405 usually means I am using a POST when I should be using a GET. In IIS I have added POST in some of the verbs associated with certain file extensions such as html, shtml, asp and aspx. This did not do any good, I still keep getting the same message in my out file. It seems in my code the original developers placed connection.setDoOutput(true) which uses POST instead of GET.
I would like to know if there is a way for my application to use GET instead of POST? Is there some setting I can change in Apache Tomcat? Please advise.
It seems the servlet you are using has overridden the doGet Method. What you can is in the HTML form you can make the method="get" or just do not declare any method it takes get by default.
Or you can modify the servlet code to accept Post request as well for that you will have to simply have to override the doPost method and wither copy paste the code there or call another helper method.
Joined: May 25, 2010
It seems the doPost method is set to its default setting, returning a not "allowed message".