Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 70606 invoked from network); 6 Dec 2002 10:19:50 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 Dec 2002 10:19:50 -0000 Received: (qmail 19328 invoked by uid 97); 6 Dec 2002 10:20:45 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 19200 invoked by uid 97); 6 Dec 2002 10:20:42 -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 19129 invoked by uid 98); 6 Dec 2002 10:20:41 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <053d01c29d10$ac3cf9b0$0700000a@dbgroup.co.uk> From: "Mike W-M" To: "Tomcat Users List" References: <20021206095031.76713.qmail@web13207.mail.yahoo.com> Subject: Re: static url routing Date: Fri, 6 Dec 2002 10:17:17 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I assume you've looked through all the elements available to you in web.xml. (I can't think of any that might help, but I'm no authority!) One (reasonably simple) solution would be to write yourself a servlet that performs the mapping for you. Assuming the root of the path remains constant for your requests like this, map that to the servlet. The servlet then has to examine the final part of the URL, lookup against your mapping-list (which you should really load up from an XML file during class-load, but you *could* hard code it), and then either redirect or forward to your required resource. (Redirect involves an extra round-trip and will mean that the user sees a URL that ends with the real filename; forwarding will leave the "original" URL in place.) Mike. ----- Original Message ----- From: "RXZ JLo" To: "Tomcat Users List" Sent: Friday, December 06, 2002 9:50 AM Subject: RE: static url routing --- "Noel J. Bergman" wrote: > > my html files have long names like > > a_b_c_d_xyz213_e_f_g.html, > a_b_c_d_pqr983_e_f_g.html > > > is it possible to have urls like > > http://localhost:8080/myapp/html/xyz213 > > point to the first file above? > > You can use either a Filter, or mod_rewrite in > Apache httpd. > I had a glance at javax.servlet.Filter - with this I cannot avoid entering a servlet, which will then wont be 'static' response. > --- Noel > Thanks rf To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: