Hi,

I am trying to dynamically include a servlet in a jsp page but i receive
a Internal Servlet Error:

1 - the page.jsp
...
<jsp:request include="/servlet/myservlet" />
....

2 - the servlet :

public class myservlet extends HttpServlet
{
   public void doGet(HttpServletRequest req, HttpServletResponse resp)
                     throws ServletException, IOException
   {
 resp.setContentType("text/html");
 PrintWriter out = new PrintWriter(resp.getOutputStream());
 out.println("my informations");
   }
}

3 - and when i load the page.jsp for the first time (compilation) i
receive the following message :

Included servlet error: 500: Internal Servlet Error:

java.lang.IllegalStateException: Writer is already being used for this
request
        at
com.sun.web.server.ServerResponse.getOutputStream(ServerResponse.java:167)

        at
com.sun.web.core.HttpServletResponseFacade.getOutputStream(HttpServletResponseFacade.java:84)

        at myservlet.doGet(myservlet.java:14)
       .....

Any ideas? thanks in advance.


Marc.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to