File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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.
I agree. Here's the link:
subject: Servlet not Found problem!