• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Raja Asim
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 25
Oracle PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I only later saw that Ulf Dittmer has pointed towards the solution . Therefore I removed the solution provided in my post.
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic