Calling Servlet to JSP

public class ServletToJsp extends HttpServlet {

 public void doGet (HttpServletRequest request , HttpServletResponse response)
  throws ServletException , IOException
  {
    request.setAttribute("servletName","ServletToJsp");
     getServletContext().getRequestDispatcher("/jsp/hello.jsp").forward(request
, response );


Calling JSP to Servlet
Add Servlet URL  in your call , either while doing a post or forward


Santosh









"Ganesh N.M" <[EMAIL PROTECTED]> on 10/31/2000 04:15:24 PM

Please respond to A mailing list about Java Server Pages specification and
      reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  Jsp to Servlet and ViceVersa



Hi All,

Can any one give me sample code for calling servlet from JSP and viceversa?

thanx in Advance.

Bye,

Ganesh

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to