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

Raja Asim
Greenhorn

Joined: Apr 13, 2011
Posts: 2
hi
i am facing problem with my code , the compiler i m using GlassFish Server and the error are
HTTP Status 405 - HTTP method GET is not supported by this URL

--------------------------------------------------------------------------------

type Status report

messageHTTP method GET is not supported by this URL

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

--------------------------------------------------------------------------------

GlassFish Server Open Source Edition 3.0.1

please tell me where i m doing mistake when i compile this code in notepade it work fine but its not working in netbeans 6.9.1 , i have searched alot form internet but all is useless ,now posting my problem here........thanks in advance

my servlet Code is given here
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41528
    
  53
I suggest to add an @Override annotation to the processRequest method and then to recompile the code.

Also note that the JDBC/ODBC bridge driver that you're using is not thread-safe, and thus a bad choice for a web app environment.

In the future, please UseCodeTags when posting code of any length; I have added these for you here. The code is unnecessarily hard to read without them, making it less likely that people will bother to do so.

Update: Also make sure that code is properly indented; unindented code is hard to read.


Ping & DNS - my free Android networking tools app
Raja Asim
Greenhorn

Joined: Apr 13, 2011
Posts: 2
Sorry , i did not get your point , kindly can you explain your point in ease way or if possible write the syntax ,it will be easy for me because i m beginner...... i will be very obliged to you
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41528
    
  53
http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html will walk you through basic knowledge about annotations; "@Override" is the important part. Once you have that in place and recompile, you will encounter a problem that should prompt some deeper thinking about why you have this problem. I promise, it'll be worthwhile for you to take this extra step.
srinithi sarathy
Greenhorn

Joined: Jun 24, 2011
Posts: 1
I too have the same problem. i have given @override too..still i am facing the problem.can anyone suggest an alternate solution?
Thank you
Manjula Weerasinghe
Greenhorn

Joined: Mar 15, 2010
Posts: 25

I only later saw that Ulf Dittmer has pointed towards the solution . Therefore I removed the solution provided in my post.


OCPJP 6, OCE JEE 6 JSP and Servlet Developer
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
As Ulf suggested, if you check out his link and include the annotation, you will get a compile error indicating you are required to override a superclass method. Bottom line - you are calling a method that you did not implement.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Here is the doGet method in the HttpServlet abstract class.



If you don't provide your own doGet to override, that is what processes a doGet.

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