HTTP Status 405 - HTTP method GET is not supported by this URL
Raja Asim
Greenhorn
Joined: Apr 13, 2011
Posts: 2
posted
0
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
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
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.
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: 35241
7
posted
0
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
posted
0
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
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: 1506
posted
0
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: 12268
1
posted
0
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.