Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 80757 invoked from network); 18 Dec 2002 15:18:51 -0000 Received: from exchange.sun.com (HELO nagoya.betaversion.org) (192.18.33.10) by daedalus.apache.org with SMTP; 18 Dec 2002 15:18:51 -0000 Received: (qmail 23759 invoked by uid 97); 18 Dec 2002 15:19:33 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 23579 invoked by uid 97); 18 Dec 2002 15:19:32 -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 23480 invoked by uid 98); 18 Dec 2002 15:19:31 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <399E1F52E73BD41194A800D0B74A08AB01E4DDA4@skipper.cincom.com> From: "Cox, Charlie" To: 'Tomcat Users List' Subject: RE: How do I get the requested page from the Request Object? Date: Wed, 18 Dec 2002 10:15:48 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N you will have to parse request.getPathInfo() yourself. String path = request.getPathInfo(); String pagename = path.substring(path.lastIndexOf('/')); (assuming no trailing '/') Charlie > -----Original Message----- > From: Jason Johnston [mailto:Jason.Johnston@epa.state.il.us] > Sent: Wednesday, December 18, 2002 10:05 AM > To: tomcat-user@jakarta.apache.org > Subject: How do I get the requested page from the Request Object? > > > > I'm just a little curious on this and I'm sure there's a > simple answer. > I've mapped a servlet with the following path "/inventory/*" which > seems to be working fine. The servler sends the request to > the servlet. > However, I'm having trouble getting the page request from the request > object. I'm just looking for index.html or similar value but > I'm having > trouble getting to it. > > The following methods return the following results: > Servlet Path: /inventoryContext Path: /boastuff Request URL: > http://localhost:8080/boastuff/inventory/index.html Request URI: > /boastuff/inventory/index.html Session ID: null > > In the example I'm looking at request.getServletPath is used to > retrieve the index.html. However, on mine it never gives that. Do I > need to parse the Request URI or Request URL to get the actual page > request or is there a method I'm not finding? > > -- To unsubscribe, e-mail: For additional commands, e-mail: