Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 706 invoked from network); 26 Jun 2002 08:06:51 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by 209.66.108.5 with SMTP; 26 Jun 2002 08:06:51 -0000 Received: (qmail 6494 invoked by uid 97); 26 Jun 2002 08:06:35 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 6476 invoked by uid 97); 26 Jun 2002 08:06:34 -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 6464 invoked by uid 98); 26 Jun 2002 08:06:34 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <20020626080545.71750.qmail@web20802.mail.yahoo.com> Date: Wed, 26 Jun 2002 01:05:45 -0700 (PDT) From: Prashanth Pushpagiri Subject: Re: Can a URI pattern be matched to a JSP? To: Tomcat Users List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: 209.66.108.5 1.6.2 0/1000/N X-Spam-Rating: 209.66.108.5 1.6.2 0/1000/N Hi: I tried this but when I add the servlet and servlet-mapping tags to the web.xml, Tomcat throws an error during startup! ERROR reading java.io.ByteArrayInputStream@76cad3 At Line 57 /web-app/servlet/ I tried adding the mappings to web.xml files in /conf and my web application...neither a success.. Am I doing something wrong? All I want to do is send the request to my index.jsp page which will check for something and then serve the file out! Thanks Prashanth --- Milt Epstein wrote: > On Tue, 25 Jun 2002, Prashanth Pushpagiri wrote: > > > Hello everyone: > > I am using Tomcat 4.0.4 on IIS. I would like to > know if there is a > > way of forwarding requests of a particular pattern > to a JSP i > > specify using Tomcat? > > > > For eg. say the user requests for a file like > > /examples/dln/sample.doc I want tomcat to forward > the request to a > > JSP /examples/index.jsp instead of serving the > file out. I guess > > this is similar to what servlet mapping is! A > particular URI pattern > > '/examples/dln' should be forwarded to a > particular JSP > > '/examples/index.jsp'. > > > > Any advice and assistance on this would be very > helpful. > > Yes, you can do this. > > Just define a servlet in your web.xml, and instead > of specifying a > servlet-class, specify a jsp-file. Then you can > specify > servlet-mapping's back to that servlet. A la: > > > somename > index.jsp > ... > > > > somename > /dln > > > (You used to be able to specify the jsp-file right > in the > servlet-mapping -- i.e. instead of the servlet-name > -- but it looks > like that was changed in the 2.3 spec. I think the > above gives the > same effect, just with the extra expense of having > to come up with a > servlet name :-). > > Milt Epstein > Research Programmer > Systems and Technology Services (STS) > Campus Information Technologies and Educational > Services (CITES) > University of Illinois at Urbana-Champaign (UIUC) > mepstein@uiuc.edu > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: For additional commands, e-mail: