Lance,
Yes- that is what I want to do:
http://.../search/servletName or its mapping.
for each servlet I want to map and call it. Lets say I
have 5 different servlets- I want to have 5 mappings
and call them all by their names.
what is this Front Controller pattern- you have some
kind of an example?

Thanks
Sanjay
--- Lance Smith <[EMAIL PROTECTED]>
wrote:
> Sanjay,
> If I understand you're request what you want is
>   /search/hello
>   /search/abc
>   /search/def
> with hello, abc, and def all being servlets. Then
> you want to be able to reach each servlet with the
> url
> http://.../search/servletName.
> 
> If this is the case I think you will end up adding a
> servlet-mapping entry
> for each
> servlet you want to call. Unless someone else can
> help.
> 
> The other methos is  the Front Controller pattern
> where a single
> Controller/servlet is mapped and it dispatches the
> request on to the
> proper place.
> Lance
> 
> -----Original Message-----
> From: Sanjay Bahal [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 10:24 AM
> To: Tomcat Users List
> Subject: RE: Servlet Deploy Problem Help
> 
> 
> Lance,
> Thanks.
> Ideally I don't want to call my servlet with /abc.
> In
> this case whatever tag I give it will open the same
> one. However what I need instead is to call
> diffrenet
> servlets with /search/hello/servletalias. How can I
> achieve that.
> Thanks
> Sanjay
> --- Lance Smith <[EMAIL PROTECTED]>
> wrote:
> > Now try http://localhost:8080/search/hello/abc
> > it should work also.
> > getting it to work with just /search/hello gets
> into
> > mapping issues I haven't had to work out yet
> sorry.
> > Lance
> >
> > -----Original Message-----
> > From: Sanjay Bahal [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 21, 2002 12:42 PM
> > To: Tomcat Users List
> > Subject: RE: Servlet Deploy Problem Help
> >
> >
> > Lance - yes it works thanks a lot.
> > But what are other shorter forms that I can use to
> > call the servlet. I would hope to call it with
> like
> > /search/hello. What has the /hello/* mapping
> bought
> > me.
> > Thanks
> > Sanjay
> > --- Lance Smith <[EMAIL PROTECTED]>
> > wrote:
> > > try
> http://localhost:8080/search/hello/HelloWorld
> > > let me know if this works.
> > > Lance
> > >
> > > -----Original Message-----
> > > From: Sanjay Bahal [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, March 21, 2002 10:13 AM
> > > To: Tomcat Users List
> > > Subject: RE: Servlet Deploy Problem Help
> > >
> > >
> > > Lance,
> > > So in other words if I may to /hello/* I would
> be
> > > able
> > > to call my servelet with /hello? or the full URL
> > > http://localhost:8080/search/hello? I tried it
> did
> > > not
> > > work- requested resource (/hello) is not
> > available.
> > >
> > > Thanks a lot,
> > > Sanjay
> > > --- Lance Smith
> <[EMAIL PROTECTED]>
> > > wrote:
> > > > Sanjay,
> > > > The servlet-mapping is a tag that allows you
> to
> > > map
> > > > a specified pattern to the specified servlet.
> > > Don't
> > > > get me started on the pattern syntax I still
> > > haven't
> > > > taken the time to fully comprehend it. So
> > > basically
> > > > what we told the server was that anytime it
> sees
> > > the
> > > > pattern "/hello/" in the context of this app
> > send
> > > it
> > > > to the HelloWorld servlet. The <anything>
> means
> > > > anything
> > > > you want to type after the "/hello/" since we
> > told
> > > > it to
> > > > match on the "/hello/".
> > > > Lance
> > > >
> > > > -----Original Message-----
> > > > From: Sanjay Bahal [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, March 21, 2002 9:01 AM
> > > > To: Tomcat Users List
> > > > Subject: RE: Servlet Deploy Problem Help
> > > >
> > > >
> > > > Lance Thanks.
> > > > What does servlet-mapping mean- is it
> directory
> > > > structure or an alias to a servlet.I was
> trying
> > to
> > > > use
> > > > /hello as an alias for the HelloWorld servlet
> > and
> > > > try
> > > > calling it by /hello or by full URL /hello- am
> I
> > > > completely off on this. and what is this
> > > <anything>?
> > > > Thanks again
> > > >
> > > >
> > > >     <servlet-mapping>
> > > >       <servlet-name>HelloWorld</servlet-name>
> > > >       <url-pattern>/hello/*</url-pattern>
> > > >     </servlet-mapping>
> > > >
> > > > Then you  should be able to call it like:
> > > > http://localhost:8080/search/hello/<anything>
> > > >
> > > > --- Lance Smith
> > <[EMAIL PROTECTED]>
> > > > wrote:
> > > > > In you're web.xml change:
> > > > >     <servlet-mapping>
> > > > >      
> <servlet-name>HelloWorld</servlet-name>
> > > > >       <url-pattern>/hello</url-pattern>
> > > > >     </servlet-mapping>
> > > > >
> > > > > to :
> > > > >     <servlet-mapping>
> > > > >      
> <servlet-name>HelloWorld</servlet-name>
> > > > >       <url-pattern>/hello/*</url-pattern>
> > > > >     </servlet-mapping>
> > > > >
> > > > > Then you  should be able to call it like:
> > > > >
> http://localhost:8080/search/hello/<anything>
> > > > >
> > > > > Hope this helps
> > > > > Lance
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Sanjay Bahal [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Thursday, March 21, 2002 8:21 AM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: Servlet Deploy Problem Help
> > > > >
> > > > >
> > > > > I am just restarting this thread. My problem
> > > > remains
> > > > > unsolved. I am running Tomcat4.01/NT. The
> > setup
> > > > > should
> > > > > be OK as the examples run.
> > > > > I am trying to deploy the HelloWorldExample.
> > > > > My directory structure is-
> > > > > Tomcat4\webapps\search\WEB-INF\classes
> > > > > I have my .htm file in the \search directory
> > and
> > > > my
> > > > > class in the \classes and my web.xml in the
> > > > > \WEB-INF.
> > > > > My web.xml looks like this- I have used the
> 
=== 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]>

Reply via email to