aspose file tools*
The moose likes Servlets and the fly likes Getting Error :HTTP Status 405 - HTTP method GET is not supported by this URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

Getting Error :HTTP Status 405 - HTTP method GET is not supported by this URL

athi ram
Greenhorn

Joined: Feb 28, 2011
Posts: 6
hi
i insert data to database using Eclipse 3.4
web server: Tomcat 6.0
database: PostgreSQL
here my code is











get error on :HTTP Status 405 - HTTP method GET is not supported by this URL


please help me


sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

Your servlet ServletUser doesnt implement doGet method, and hence when you enter the URL to servlet in browser addressbar and hit enter, you get this error.
Implement doGet in your servlet and the error will go away.


[Servlet tutorial] [Servlet 3.0 Cook Book]
ramakrishna rayudu
Ranch Hand

Joined: Mar 08, 2011
Posts: 57
Hi..

the default Method id HTTP GET method so You need to Implement The goGet(HttpServletRequest request,HttpServletResponse response) in your Servlet Class.

if your servlet is Excepting some data from the Browser(from HTML FROM)
then you have mention <from name="TestFrom" method="POST">
You Need to Specify The HTTP Method Like This...
athi ram
Greenhorn

Joined: Feb 28, 2011
Posts: 6
thank you sir.

now i am got another error

SQLException caught: The column index is out of range: 1, number of columns: 0
ramakrishna rayudu
Ranch Hand

Joined: Mar 08, 2011
Posts: 57
Hi..
Check your DataBase Table Name And Number of coloumns in your message table
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61430
    
  67

Please post your database question in the JDBC forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Error :HTTP Status 405 - HTTP method GET is not supported by this URL