I'm having Yet Another Servlet Mapping Problem.
I'm trying to disable the /servlet/ mapping with my web-application. Here's the
gist of what's happening.
My webapp is called "songs" it get's deployed according to J2EE specs. In the
webapps folder there's a
songs folder with an html file called songs_index.html.
in songs\WEB-INF, I put my servlet into the classes folder (and some dependent
jars in the lib folder).
In web.xml I add the following:
<servlet>
<servlet-name>listSongs</servlet-name>
<servlet-class>com.music.songs.ListSongServlet</servlet-class>
</servlet>
I don't specify a mapping as I want to use the default.
In songs_index.html, I do a FORM POST to the following URL:
"serlvet/listSongs"
This works, however if I try the following
"listSongs"
it doesn't (404 is returned).
If I type in my URL as follows:
http://localhost:8080/songs/servlet/listSongs
the servlet fires
if I type
http://localhost:8080/songs/listSongs
it doesn't.
so How do I turn off that /servlet/ prefix? I've tried removing prefix=/servlet/
from the InvokerInterceptor entry in server.xml
Additionally, what does that odd web.xml file in <TOMCAT_HOME>/conf do? I notice
that there's a servlet mapping for servlet-name=Invoker
that maps to /servlet/* - I tried removing that but it made no difference.
How *do* you set up a servlet to be called in the application space but without
the /servet/ prefix?
-Thom
p.s. I'm using the final release of Tomcat.
Juan Munoz wrote:
> Hello,
>
> I'm developing a VoiceXML application using tellme.com's tools. Apparently,
> their browser doesn't work properly unless the correct content-length header
> is set. Tomcat doesn't set this correctly from the JSPs I'm writing. How
> can I configure tomcat to set the correct content-length? I haven't been
> able to find any documentation anywhere on this.
>
> Has anyone else here been able to get tomcat to work with tellme?
>
> Thanks for any help,
>
> -Juan
>
> -------------------------------------------
> Juan Munoz
> Scient (R): Innovate - For What's Next(TM)
> 500 Technology Square
> Cambridge, MA 02139
> [EMAIL PROTECTED]
> 617-768-2055(W)
> 617-461-6631(M)