tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Treves" <>
Subject including servlets in a customed tag
Date Wed, 28 Mar 2001 13:03:25 GMT

    I am trying to include a servlet while processing a tag I wrote, I don't need specifically
the request and response of the pageContext of that tag. I tried to include the servlet with
new and with the existing request/response, both way the servlet simply was not included.
it looks like it simply skips the including line.

the tag code is:

  ServletRequest request = pageContext.getRequest();
  request.setAttribute("recipientId",userId); // add an attribute to be passed to the included
  ServletResponse response = pageContext.getResponse();
  System.out.println("in tag");
  javax.servlet.RequestDispatcher rd = pageContext.getRequest().getRequestDispatcher("/courses/servlet/cacheUsers");
  rd.include(request, response);
  System.out.println("after including (in tag)");
catch(javax.servlet.ServletException e){
  System.out.println("ServletException: " + e.getMessage());

As you can see there are System outs and both of them printed. (the code was taken from the

Any idea whats wrong here?


View raw message