aspose file tools*
The moose likes Servlets and the fly likes Calling servlet from JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling servlet from JSP" Watch "Calling servlet from JSP" New topic
Author

Calling servlet from JSP

hash eagle
Greenhorn

Joined: Jun 23, 2001
Posts: 6
Hi guys, I use JBuilder. I declare a form like this in the JSP page:
<form method="post" action="/servlet">
<input type="submit" name="login" value="something">
</form>
the problem is everytime i click on the form, i always get this message:
Ctx( ): 400 R( /) null
Ctx( ): IOException in: R( /) Not connected: socket write error
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
which web sever u r using? where r u keeping ur servlets and jsp files??
hash eagle
Greenhorn

Joined: Jun 23, 2001
Posts: 6
i use tomcat in jbuilder5.. the path is correct.. but i dunno what's wrong
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12805
    
    5

<form method="post" action="/servlet">
does not give the name of a servlet class to execute!
Is that really the way your HTML form looks?
Bill
hash eagle
Greenhorn

Joined: Jun 23, 2001
Posts: 6
<form method="post" action="/servlet/FileManServlet">
Originally posted by William Brogden:

<form method="post" action="/servlet">
does not give the name of a servlet class to execute!
Is that really the way your HTML form looks?
Bill

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12805
    
    5
I wrote a chapter on debugging servlets - available free at:
http://www.lanw.com/books/servletjsp/default.htm
The first thing to do is to find out if your servlet is even getting recognized and loaded by the servlet engine (Tomcat?) -
to do that put an output statement in the init() method - if that is not showing up then you have a naming problem.
Bill
 
 
subject: Calling servlet from JSP