"flower" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > Let's consider situation like this: > We have got some servlets responsible for genereting galery page. We want > group galery pages by use common part in uri (/galery/): > http://x.com/galery/galery_id/firstpage.html > http://x.com/galery/galery_id/secondpage.html > > firstpage.html is generated by servlet1 , secondpage.html by servlet2. > > So we must url-pattern like this: /galery/*/firstpage.html and > /galery/*/secondpage.html but this url-pattern doesn't work. > question: why ? ( I use version 5.5.9 ) > > Some people, with I was talking about this, said that patterns like this > was work with previously version and that version 5.5.9 is "crazy" ;] >
I've got a vague recollection that some some such Tomcat-specific extension was proposed on the dev list. Can't remember if it was ever implemented (and to which version), and I'm much to lazy to look it up :). However, the 5.5.9 behavior is in strict compilance with the Servlet spec (and, hence anything but "crazy"). > Is any way to obtain behaviour like above with latest version ? > Simplest is with a Filter that does something like: RequestDispatcher rd = null; if(request.getRequestURI().endsWith("/firstpage.html") { rd = getServletContext().getNamedDispatcher("servlet1"); } else if(request.getRequestURI().endsWith("/secondpage.html"); rd = getServletContext().getNamedDispatcher("servlet2"); } if(rd != null) { rd.forward(request, response); } > Greatings > flow --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]