aspose file tools*
The moose likes Servlets and the fly likes 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
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP Status 405 - HTTP method GET is not supported by this URL" Watch "HTTP Status 405 - HTTP method GET is not supported by this URL" New topic
Author

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

mak zoe
Greenhorn

Joined: Mar 21, 2010
Posts: 8
Hi all, I am first here...
I am now working a servlet which will also be connected to the database.
The problem is that , it shows the following error...

type Status report

message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).


I have tried the following code and also the code :: doPost(request,response);
However, both don't work...

Please help...

James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

The access specifier of doGet method is public...
public void doGet(HttpServletRequest request, HttpServletResponse response)

and its doPost not doPOST()


SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
James Tharakan wrote:The access specifier of doGet method is public...
public void doGet(HttpServletRequest request, HttpServletResponse response)


It's protected not public. And I still have to find out why given code doesn't work.


SCJP 1.5(97%) My Blog
James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

shivendra tripathi wrote:It's protected not public.


Thanks for correcting me
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP Status 405 - HTTP method GET is not supported by this URL