hello
i have a jsp:include and forward problem

the scenario is as follows.

i have two JSP files and one servlet files.

In the First File say "index.jsp" i am including one servlet file say "ServletTest". and in the included servlet file i am forwarding to the other jsp file say "test.jsp" but i am getting an error javax.servlet.ServletException

i am working on j2ee ri 1.3.1(jsp&servlet container cored tomcat )... please reply soon me really stuck

thanks alot !!

All files as attachments original.war

-----------------------------------------------

<!--content of index.jsp:-->

<jsp:include page="/ServletTest"/>

------------------------------------------------

//content of ServletTest.java:

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;


/**
 * @Author heinzli
 */
public class ServletTest extends HttpServlet
{
    public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
    {
        System.out.println("servlet"); 

       

        RequestDispatcher rd = getServletContext().getRequestDispatcher("/test.jsp");
       
        rd.forward(request,response);
    }
   
  
    public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
    {
        doPost(request,response);
    }       
}

------------------------------------------------

<!--content of test.jsp:-->

<br>i m return file.<br>

heinzli

 

Attachment: original.war
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to