File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp" Watch "jsp" New topic


manoj Mahadik

Joined: Nov 21, 2000
Posts: 8
how to call servlet from jsp page?
Paul Ramsden

Joined: Sep 22, 2000
Posts: 28
One way would be to add a form to the JSP and set the form action to call the servlet.
You can include content into a JSP from another JSP (which is essentially a servlet)
nirmal baba

Joined: Apr 06, 2001
Posts: 10
U can use the <jsp:forward>action tag to allow the request to be forwarded to another servlet. The only constraint with this tag is the servlet to which the request is being forwarded must be in the same context as the JSP dispatching the request.
U can also use the <jsp:include> tag to include the servlet output in the calling JSP
Don't get me started about those stupid light bulbs.
subject: jsp
It's not a secret anymore!