Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 79966 invoked from network); 6 Jul 2004 17:42:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Jul 2004 17:42:46 -0000 Received: (qmail 44686 invoked by uid 500); 6 Jul 2004 17:26:39 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 44617 invoked by uid 500); 6 Jul 2004 17:26:38 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 44575 invoked by uid 99); 6 Jul 2004 17:26:37 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [204.74.20.252] (HELO sid.armstrong.com) (204.74.20.252) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 06 Jul 2004 10:26:36 -0700 Received: from joedog.org ([10.16.9.254]) by sid.armstrong.com (8.12.8p1/8.12.8) with ESMTP id i66H7Vm1008939 for ; Tue, 6 Jul 2004 12:07:31 -0500 Message-ID: <40EAE0BC.6060109@joedog.org> Date: Tue, 06 Jul 2004 13:26:20 -0400 From: Tim Funk Organization: Human being User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en, es-mx, de, sv MIME-Version: 1.0 To: Tomcat Users List Subject: Re: lost output including a servlet in a JSP which includes a JSP References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is all wrong. You need to get a RequestDispatcher via: or -- or -- RequestDispatcher rd = request.getRequestDispathcer(myPath); rd.include(request, response); -Tim M.Hockings wrote: > What I want to do is to include a servlet in a .JSP. For reasons that I > won't go into please assume that in the environment that I wish this to > run I cannot define a named servlet nor can I load by classname. > > A simplified version of what I have been doing is below: > > <% > Class c = Class.forName("name-of-the-servlet-class"); > Servlet s = (Servlet) c.newInstance(); > s.init(this.getServletConfig()); > s.service(request, response); > %> > > This sorta works. That is, it will load and run the servlet and the > output from the servlet is deliverd to the browser. But if the called > servlet class includes a .JSP then the output of that .JSP is never seen > though if debugged it does run OK and produces output. The servlet > itself is generated by compiling a .JSP with jspc. What am I missing. > > I realize that this inquiry is not strictly Tomcat related but I figure > that the people who will have the knowledge answer to my lost output > mystery will be here! > > Your thoughts on this problem are appreciated. > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org