Hi,

sorry for my question, but I'm googling, reading manuals and still no answer...

So. The question si very simple:

How can I ommit the servlet name in the URL?

Ex.: I have http://localhost:8080/ServletTest/path_in_the_servlet_and arguments

and I need http://localhost:8080/path_in_the_servlet_and arguments

I will run under Tomcat only one servlet; and I want to handle all the domain.

To override "DefaultServlet" is, I think, not so good solution, isn't it?

Thank you very much for your tips.

PETR


On 1/23/06, Petr Hadraba <[EMAIL PROTECTED]> wrote:
> Hi,
>
> sorry for my question, but I'm googling, reading manuals and still no 
> answer...
>
> So. The question si very simple:
>
> How can I ommit the servlet name in the URL?
>
> Ex.: I have http://localhost:8080/ServletTest/path_in_the_servlet_and 
> arguments
>
> and I need http://localhost:8080/path_in_the_servlet_and arguments
>
> I will run under Tomcat only one servlet; and I want to handle all the domain.
>
> To override "DefaultServlet" is, I think, not so good solution, isn't it?
>
> Thank you very much for your tips.
>
> PETR
>
>
> On 1/23/06, Len Popp <[EMAIL PROTECTED]> wrote:
> > On 1/23/06, Darren Hall <[EMAIL PROTECTED]> wrote:
> > > > > From: Darren Hall [mailto:[EMAIL PROTECTED]
> > > > > Subject: RE: (newb) Tomcat servlet mapping problem
> > > > >
> > > > > Is there a way I can map these servlets (in the web.xml file) so
> > > > > that Tomcat can see them and execute them?
> > > >
> > > > Not that I'm aware of, since the application code is in violation of the
> > > > spec.  Others with more experience may know some tricks.
> > > >
> > > > - Chuck
> > >
> > > Well, that really stinks. That means I have either a big code change ahead
> > > of me, or we need to continue using the invoker servlet for now.
> > >
> > > Thanks for your help, Chuck.
> > >
> > > If anyone knows a way that I can map a servlet that is not in a package
> > > through the web.xml, please let me know.
> > >
> > > Thanks
> > >
> > > Darren
> >
> > As far as I can see, it just works. Whether it's correct or not, it
> > does seem work in Tomcat 5.5.12 and I know it worked in 5.0.28 too. So
> > this is probably not the cause of your problem. Try putting one
> > servlet in a package to see if that makes a difference, before you try
> > to change them all.
> >
> > Here's a servlet declaration that I just tested:
> > <servlet>
> >   <servlet-name>Test</servlet-name>
> >   <servlet-class>Test</servlet-class>
> > </servlet>
> > <servlet-mapping>
> >   <servlet-name>Test</servlet-name>
> >   <url-pattern>/test</url-pattern>
> > </servlet-mapping>
> >
> > --
> > Len
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

Reply via email to