tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: Tomcat treating a directory as a file
Date Sun, 06 May 2007 17:33:58 GMT
Good Afternoon Len
Thanks for the explanation
I believe you will find the information you're looking for here inside 
web.xml

    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

In other words / is actually mapped to servlet-name of 'default'
    <servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

Does this answer your question???
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Leonard Smith" <lrsmith@gmail.com>
To: "Tomcat Users List" <users@tomcat.apache.org>; "Martin Gainty" 
<mgainty@hotmail.com>
Sent: Sunday, May 06, 2007 1:16 PM
Subject: Re: Tomcat treating a directory as a file


> Martin,
> The difference between the two URLs is the trailing "/" character.
> With Apache httpd I can specify the URL http://foo.bar/help/  and
> http://foo.bar/help and I will get the index.html under the help
> directory.
>
> With Tomcat the first URL, with the trailing slash, will return the
> index.html. The second URL, without the trailing "/" seems to be
> treated as a filename, and returns a 404.
>
> So what I'm trying to get Tomcat to is return the index.html for both
> URLs, similar to what Apache httpd is doing.
>
> Thanks
> Len
>
>
>
>
> On 5/6/07, Martin Gainty <mgainty@hotmail.com> wrote:
>> the URLs look identical???
>> inside /WEB-INF/web.xml you *should* see a welcome-file-list
>>
>>   <welcome-file-list>
>>     <welcome-file>index.jsp</welcome-file>
>>   </welcome-file-list>
>>
>> This should be the file displayed when the webapp is loaded
>> Is this not the case???
>>
>> Thanks
>> Martin
>> This email message and any files transmitted with it contain confidential
>> information intended only for the person(s) to whom this email message is
>> addressed.  If you have received this email message in error, please 
>> notify
>> the sender immediately by telephone or email and destroy the original
>> message without making a copy.  Thank you.
>>
>> ----- Original Message -----
>> From: "Leonard Smith" <lrsmith@gmail.com>
>> To: <users@tomcat.apache.org>
>> Sent: Sunday, May 06, 2007 12:03 PM
>> Subject: Tomcat treating a directory as a file
>>
>>
>> > To all,
>> >
>> > I'm running Tomcat 5.5 on linux and I'm running into a problem with
>> > URLs. I have a directory in my webapp called "help" with an index.html
>> > in that directory. If I goto the URL http://foo.bar/help I get a 404
>> > and the index.html is not loaded. However if I goto the URL
>> > http://foo.bar/help/ things work fine.
>> >
>> > This is different than what i've seen with Apache httpd and I'm
>> > assuming it is just a config change, but I haven't been able to track
>> > it down yet.
>> >
>> > Can someone point me in the right direction?
>> >
>> > Thanks,
>> > Len
>> >
>> > ---------------------------------------------------------------------
>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> > For additional commands, e-mail: users-help@tomcat.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message