File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes calling servelt with jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "calling servelt with jsp" Watch "calling servelt with jsp" New topic
Author

calling servelt with jsp

jai dev
Greenhorn

Joined: Nov 05, 2003
Posts: 1
hai guys,
could u plz help me out , by telling me, how to call a servelt using jsp.
thanku
jai


jaidevs
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 635
hi Jai,
Try this!
1) If servlet is in same context/server say
Tomcat
webapps
Test
Web-Inf
jsp
MyJsp.jsp
servlets
Myservlet.class
<jsp:forward page="../servlet/Myservlet"/>
2) IF servelt is in diff server
RequestDispatcher rd=request.getRequestDispatcher("path of ur servlet");
rd.forward();
Hope this helps
Cheers
Praful
[ November 05, 2003: Message edited by: Praful Thakare ]

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Chandra Bairi
Ranch Hand

Joined: Sep 12, 2003
Posts: 152
use the following RequestDispatcher.forward(url) where url is the name of the servlet this should help you out.
KIndly let me know if there is any mistake.
good luck


Thanks,
Shekar
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: calling servelt with jsp