Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 14858 invoked from network); 13 Aug 2002 06:01:00 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 13 Aug 2002 06:01:00 -0000 Received: (qmail 21927 invoked by uid 97); 13 Aug 2002 06:01:17 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 21894 invoked by uid 97); 13 Aug 2002 06:01:16 -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 21881 invoked by uid 98); 13 Aug 2002 06:01:15 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) From: "Adam W. Montville" To: Subject: JSP vs. Servlet Paths Date: Mon, 12 Aug 2002 23:00:44 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi all, I'm new to this list and really need some help. Let me frame the scenario: I have CATALINA_HOME set to C:\jakarta-tomcat-4.0.4\jakarta-tomcat-4.0.4. The rest of the directory structure (and file locations) is as follows: CATALINA_HOME | +-- webapps | +-- demo | +-- jsp | +-- WEB-INF | +-- classes The "classes" directory contains MyServlet.class, WEB-INF contains web.xml, "jsp" contains both SourceJsp.jsp and TargetJsp.jsp. SourceJsp.jsp displays a submit button, which then calls TargetJsp.jsp, i.e., it contains the line "
". I then have a Servlet, MyServlet.java that also calls TargetJsp.jsp. MyServlet.java contains the line "this.getServletContext().getRequestDispatcher("/jsp/TargetJsp.jsp").forward (req, resp)". Please pay attention to the path difference between these two calls. SourceJsp.jsp and MyServlet.java both "invoke" the same TargetJsp.jsp, however, the paths are different: SourceJsp.jsp = /demo/jsp/TargetJsp.jsp; MyServlet.java = /jsp/TargetJsp.jsp. I need to understand why this must be the case. What is the difference between a JSP invoking a JSP and a Servlet invoking a JSP with regard to the paths required for such invocation? Thank you for your help! I appreciate it! Regards, Adam -- To unsubscribe, e-mail: For additional commands, e-mail: