File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes http 405 error when invoking a servlet from jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "http 405 error when invoking a servlet from jsp" Watch "http 405 error when invoking a servlet from jsp" New topic
Author

http 405 error when invoking a servlet from jsp

Rema Hebbar
Greenhorn

Joined: Jun 21, 2001
Posts: 2
iam calling a servlet from the javascript with a jsp page. the servlet connects to database checks for the login details of user and has to print a html page depending on whether the userdetails are available in database or not. when i click on the login button the servlet is invoked but the html page is not getting displayed on my browser. the servlet and jsp page are put in the proper folders of javawebserver and jrun. the page appears for a second and then the error header Http 405 Resource not allowed appears on top of my browser. I have tested the code in Jrun and JavaWebserver2.0 and i face the same problem.
The code however worked alright in another machine running JRun.
What correction should i make to the code.
Want a reply asap
Thanks
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
...then the error header Http 405 Resource not allowed....
405 seems to be an error in the METHOD tag. What are you
setting the method to?
Acc to the API:

Status code (405) indicating that the method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

regds.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Rema Hebbar
Greenhorn

Joined: Jun 21, 2001
Posts: 2
i have used doPost method in the servlet and method="post" in the javascript. I also changed the method to service() in the servlet keeping the rest of the code unchanged but the error continues.
Iam getting an error in the error log as "Error encountered while entering data in database java.sql.SQLException: No suitable driver" What should i do? I have the Client version of Oracle8i version 8.1.6 installed in my system.
Will greatly appreciate your reply.
Can also forward the code next time.
Regards
Rema
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Iam getting an error in the error log as "Error encountered while entering data in database
java.sql.SQLException: No suitable driver" What should i do?

If this is the error you see, then to me this mean that there seems to be a problem with the JDBC driver, if you are using one.
regds.
- satya
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: http 405 error when invoking a servlet from jsp
 
Similar Threads
form-based authentication
Anyone know of free servets/jsp hosting?
http 405 Resource not allowed
HTTP Error 405 405 Method Not Allowed
405 resource not allowed in JRun