> From: Calum [mailto:cal...@gmail.com] > Subject: Re: webapp servlet vers web services
> On 27 April 2011 18:02, <robert.jen...@surecomp.com> wrote: > > <servlet-mapping> > > <servlet-name>InitServlet</servlet-name> > > <url-pattern>/</url-pattern> > > </servlet-mapping> > > > If I understand spec correctly and this being the only mapping, > it will become the default and all requests will be routed to > the servlet. > No - I think it would have to be /* You need to read the servlet spec; it explicitly states that using just a slash indicates the default servlet for the webapp, used when all other attempts at mapping fail. However, doing so means you override Tomcat's DefaultServlet, so it will not be available to handle static content - which may or may not be a problem, depending on the webapp. > > is there something like the idea of serlvet for web services > > that will route all requests into a common location and from > > there let the application farm it out to the correct web service. That's how a lot of the frameworks operate; all requests are passed through a controller servlet which then decides what to do with it based on its own configuration. > > I like to isolate some security and business logic in to one > > location and have that entered first by the web service call > > and then pass along to correct service. Try using a filter rather than a servlet for actions. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org