dear all, i have a servlet running perfectly on local machine. but i uploaded the site and try to access, its giving following error. HTTP Error 405 405 Method Not Allowed The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting. Please contact the server's administrator if this problem persists. why is this error and how can i overcome it? any idea? please do reply thanks in advance sachin
Harpal Singh
Ranch Hand
Joined: Oct 10, 2000
Posts: 229
posted
0
Dear Sachin, Can u post ur code so that i can see what is wrong???I am sure something to do with doGet or doPost method..... Harpal
sachin dabhade
Ranch Hand
Joined: Mar 10, 2001
Posts: 73
posted
0
Originally posted by Harpal Singh: Dear Sachin, Can u post ur code so that i can see what is wrong???I am sure something to do with doGet or doPost method..... Harpal
dear sir, the code goes here i have used method post on html page and doPost in servlet =============== import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; import sun.net.smtp.*;
public class sanquotdhootgroup extends HttpServlet{ static Connection conn; String Ph=null,Std,Phone,FName,LName,City,State,Email,Add1,Add2,Address; String Zip,BuyFrom,Model,Color; Statement stmt; ResultSet rs; int GodownCost=0,Registration=0,TotalCost=0,Insurance=0;
out.println("<tr><td bgcolor=#dfdfdf><b>Total Price </b></td><td bgcolor=#dfdfdf >"+TotalCost+"</td></tr>"); out.println("<tr></tr><tr><td bgcolor=#dfdfdf><font color=blue> Terms & Condition :</font></td></tr> "); out.println("<tr><td bgcolor=#dfdfdf>Purchase to be made : "+BuyFrom+"</td></tr>");
out.println("<tr><td bgcolor=#dfdfdf> This Quotation is not valid without authorised signature.</td></tr> "); out.println("<tr><td bgcolor=#dfdfdf> Quotation is valid for 30 days</td></tr> "); out.println("<tr><td bgcolor=#dfdfdf> Quotation is valid within Aurangabad jurisdiction</td></tr> "); out.println("<tr><td bgcolor=#dfdfdf> Delivery of the car depends on the availability</td></tr> "); out.println("<tr><td bgcolor=#dfdfdf> We Provide 3 year extended warranty</td></tr> ");
out.println("<tr><td><font color=blue><b>Thanks for visiting this site</b></font></td></tr></table><body></html>");
[This message has been edited by sachin dabhade (edited May 16, 2001).] [This message has been edited by sachin dabhade (edited May 17, 2001).]
Pallavi G
Greenhorn
Joined: May 07, 2001
Posts: 5
posted
0
Hi there, I hope i understood your problem correctly, but just wanted to check. Did you check the settings of the webserver on the The server? I mean is the servlet in a proper directory of a webserver or have u registered it(if u need to). Or u may just wanna check the path which u have put in HTML to call the servlet. I am sure u must have checked all this but just wanted to confi
Peter den Haan
author
Ranch Hand
Joined: Apr 20, 2000
Posts: 3252
posted
0
Originally posted by sachin dabhade: i have used method post on html page and doPost in servlet
Well... are you really, really sure about that first bit? What you think is happening and the error message you get are contradictory, and the first thing to do IMHO is sort out which of them is wrong. Try adding a doGet with just 'out.println("Eeks! A get!");' and see what happens. - Peter
sachin dabhade
Ranch Hand
Joined: Mar 10, 2001
Posts: 73
posted
0
please check the following link. http://www.cord2cables.com/dm/santro.html and click on quotation then here, the servlet " sanquotdhootgroup " is called using post method and the servlet code is given above sachin [This message has been edited by sachin dabhade (edited May 17, 2001).]
Thomas Baumann
Greenhorn
Joined: May 02, 2001
Posts: 10
posted
0
Hi, try method=post instead of method="post" in your NewSantroQuot.html Hope it helps, Thomas
Thomas Baumann
Greenhorn
Joined: May 02, 2001
Posts: 10
posted
0
By the way: Is your URL in the Form-Tag (NewSantroQuot.html) ok? Thomas
Harpal Singh
Ranch Hand
Joined: Oct 10, 2000
Posts: 229
posted
0
Dear Sachin, Nothin to worry abt!It is a simple problem,Let us make a few changes.... 1)in your servlet replace doPost() with service() method without changing anything else and now lets see if ur problem is solved OR 2)if this does not work out make the above said change and change the method=post in html page to method=get I am sure it should work .......Please let me know ASAP else I will set up the database and work on it... Thanks, Harpal
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.