I found a problem with this. If you don't do /* it becomes case sensitive. So that again becomes an issue. Sanjay --- Sanjay Bahal <[EMAIL PROTECTED]> wrote: > Yes this works? I will paly with it more and post. > Thanks a lot, > Sanjay > --- Lance Smith <[EMAIL PROTECTED]> > wrote: > > Sanjay, > > Try > > > http://localhost:8080/<context>/search/SearchServlet > > > > where <context> is the directory name under > webapps. > > Lance > > > > > > -----Original Message----- > > From: Sanjay Bahal [mailto:[EMAIL PROTECTED]] > > Sent: Monday, March 25, 2002 5:04 PM > > To: Tomcat Users List > > Subject: RE: Servlet mapping question > > > > > > My problem has been this mapping has not worked: > > <servlet-mapping> > > <servlet-name>SearchServlet</servlet-name> > > > > <url-pattern>/search/SearchServlet</url-pattern> > > </servlet-mapping> > > If I try to call this- > > http://localhost:8080/search/SearchServlet it > fails > > uneless I make mapiing to /search/*. > > Thanks > > Sanjay > > --- Lance Smith <[EMAIL PROTECTED]> > > wrote: > > > Then according to Craig's previous email you > need > > > to-do > > > something like this: > > > <servlet-mapping> > > > <servlet-name>SearchServlet</servlet-name> > > > > > > <url-pattern>/search/SearchServlet</url-pattern> > > > </servlet-mapping> > > > <servlet-mapping> > > > > <servlet-name>SearchServlet2</servlet-name> > > > > > > > <url-pattern>/search/SearchServlet2</url-pattern> > > > </servlet-mapping> > > > > > > then you should reach it with > > > http:/.../search/SearchServlet or > > > http://.../search/SerchServlet2 for you're two > > > different ones. > > > > > > Let me know if this is what you are looking for. > > > Lance > > > > > > -----Original Message----- > > > From: Sanjay Bahal [mailto:[EMAIL PROTECTED]] > > > Sent: Friday, March 22, 2002 3:16 PM > > > To: Tomcat Users List > > > Subject: RE: Servlet mapping question > > > > > > > > > I have a similar issue- albeit simpler. I have > two > > > servlets in one subdir. I have mapped it with > > > something like- > > > <servlet-mapping> > > > <servlet-name>SearchServlet</servlet-name> > > > <url-pattern>/search/*</url-pattern> > > > </servlet-mapping> > > > As a result of which /search/anything calls the > > > SearchServlet. How do I map to another servlet > in > > > the > > > same directory. I tried removing the /* and > giving > > a > > > specific name- the 1st servlet itself fails. > > > Thanks > > > Sanjay > > > --- "Craig R. McClanahan" <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > > On Fri, 22 Mar 2002, Sean LeBlanc wrote: > > > > > > > > > > > > > > To add even more to this - I can't even get > > the > > > > pattern like this > > > > > to work: > > > > > > > > > > <url-pattern>/c*</url-pattern> > > > > > > > > > > anything typed doesn't seem to get > recognized > > > and > > > > used by the > > > > > servlet. Any ideas would be welcome. > > > > > > > > > > > > > You might start by consulting the Servlet > > > > Specification, to see what > > > > mapping patterns are legal :-). > > > > > > > > > > <http://java.sun.com/products/servlet/download.html> > > > > > > > > 1. Exact match (/foo or /foo/bar) > > > > 2. Prefix match (/* or /foo/* or /foo/bar/*) > > > > 3. Extension match (*.jsp or *.foo) > > > > 4. Default servlet (/) used if no other > mapping > > > > matches. > > > > (NOTE: Tomcat 4 uses this for the > > > file-serving > > > > servlet, > > > > so replacing it will remove file serving > > > unless > > > > you do > > > > that yourself) > > > > > > > > The rules are applied hierarchically -- in > other > > > > words, the container > > > > checks for exact matches first, then prefix > > > matches, > > > > ... > > > > > > > > In each case, request.getServletPath() will > > return > > > > the portion of the > > > > request URI that was used to map to your > > servlet. > > > > In case (2), anything > > > > after the matching part will be returned via > > > > request.getPathInfo(). > > > > > > > > Craig McClanahan > > > > > > > > > > > > -- > > > > To unsubscribe: > > > > > > > > > > <mailto:[EMAIL PROTECTED]> > > > > For additional commands: > > > > <mailto:[EMAIL PROTECTED]> > > > > Troubles with the list: > > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Yahoo! Movies - coverage of the 74th Academy > > Awards. > > > http://movies.yahoo.com/ > > > > > > -- > > > To unsubscribe: > > > > > > <mailto:[EMAIL PROTECTED]> > > > For additional commands: > > > <mailto:[EMAIL PROTECTED]> > > > Troubles with the list: > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > -- > > > To unsubscribe: > > > > > > <mailto:[EMAIL PROTECTED]> > > > For additional commands: > > > <mailto:[EMAIL PROTECTED]> > > > Troubles with the list: > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Movies - coverage of the 74th Academy > Awards. > > http://movies.yahoo.com/ > > > > -- > > To unsubscribe: > > > <mailto:[EMAIL PROTECTED]> > === message truncated ===
__________________________________________________ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>