You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Samuel ARNOD-PRIN <sa...@smile.ch> on 2001/04/25 00:45:31 UTC

Tomcat 3.2.2b2 : bug reading web.xml (jsp are forgotten !)

Hello,

I've discovered a very strange bug.......

I've got a few servlets.
Each of these must serve on type of extension

One of them must server a few extensions (xml, html, jsp, xsp, ...)

I've looked in tomcat source code to discover from where the bug comes.

In my web.xml, I've got theses lines :

<servlet-mapping>... servlet s1 ... *.jsp </servlet-mapping>
then
s1 .... *.html
s1 .... *.xml
s1 .... *.xsp
s1 .... *.soon..

s2 ... *.login
s3 ... *.logout
s4 .... *.sgif


What did happen ?? Then my jsp files were served by the default
JspServlet ..
and why then ??

I put a flag into the method :

    Container matchExtension( Request req )
from the class org.apache.tomcat.request.SimpleMapper1

my flag was to print the extM org.apache.tomcat.util.SimpleHashtable to
see what there was in..
well when .jsp is added, it shows jsp as key and my servlet s1 as
value...

but after html
I've got twice jsp keys !!!
and the most terrible at the last (sgif), my 2 jsp keys' values are :
JspServlet !!!

how strange !!!
a hashtable even simple should never had the same keys twice !!
and then the value of these keys are changed !!!
unfortunately I did not know who changed the hashtable values !!

I put a flag into SimpleHashtable.put but nothing happened there !!

Well, I hope you understood my english.. if you need I can send you my
web.xml file