• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

http 405 error when invoking a servlet from jsp

 
Rema Hebbar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...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
 
Rema Hebbar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic