This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlet not Found problem! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet not Found problem!" Watch "Servlet not Found problem!" New topic

Servlet not Found problem!

sabbir kazi
Ranch Hand

Joined: Feb 03, 2001
Posts: 62
I am using TomCat 3.2.1 as my servlet engine. I have created my own app folder on Tomcat and put my own servlets on the servlet ("/classes") directory. I have no problem with activating my servlets from my applets. But recently, I have developed another servlet which can't be found by the Applet while TomCat console shows the following error:
400 R( /WILEDS + /servlet/StudentMonitor + null) HTTP GET is not supported by this URL
My Applet code snippet is :
// Connect to the servlet
URL studentServlet = new URL("http://pc36777-0/WILEDS/servlet/StudentMonitor");

URLConnection studentServCon = studentServlet.openConnection();
} catch(Exception e) {


Anyway, the 'StudentMonitor' servlet class file is in the right directory under TomCat.
Any help will be highly appreciated.
Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
Make sure you have a doGet() method in your servlet
Hope this helps
Sun Certified Java Programmer
Sun Certified Java Developer
I-Net Certified
A+ Certified
Network+ Certified

sabbir kazi
Ranch Hand

Joined: Feb 03, 2001
Posts: 62
Thanks Ray. After adding the following,
protected void doGet(Http.. req, Http... res) {
try {
doPost(req, res);
} catch(IOException ioe) {
it works, but got nullPointerError when the doPost method tries to execute
where seleStmt is a preparedStatement.
Any further help will be highly appreciated again.
sabbir kazi
Ranch Hand

Joined: Feb 03, 2001
Posts: 62
I think I have figured out the cause for the NullPointerException in my Stmt.clearParameters() statement. I didnot use any parameter in my queryString.
Thanks Ray again.
It is sorta covered in the JavaRanch Style Guide.
subject: Servlet not Found problem!
Similar Threads
404 - the requested resource is not availabe...
Servlet beginners problem
Apache -> Tomcat servlet problem
Servlet can Call an Applet