This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes call servlet  from a jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "call servlet  from a jsp" Watch "call servlet  from a jsp" New topic

call servlet from a jsp

nitin kumar
Ranch Hand

Joined: May 14, 2002
Posts: 105
Im new to Servlet.In my web.xml
<display-name>Hello Servlet</display-name>
<description>Hello, Servlet!</description>

I need to call this servlet from a jsp .So can I use
this code

<jsp:forward page="/servlet/Hello">

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761

With a correct web.xml, you should not need the "/servlet/" see the Invoker servlet faq.
I'm assuming that both the JSP and servlet are in the same "web application"
wood burning stoves
subject: call servlet from a jsp
Similar Threads
calling servlet from jsp
Jboss4.2 with Eclipse 3.3 - Page does not refresh
getting the contextpath to read and write text files
help me with struts