• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling servelt with jsp

 
jai dev
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai guys,
could u plz help me out , by telling me, how to call a servelt using jsp.
thanku
jai
 
Praful Thakare
Ranch Hand
Posts: 642
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Chandra Bairi
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic