Mobile app version of vmapp.org
Login or Join
Annie201

: Why the difference between Tomcat and Tomcat7 regarding servlet mapping and defaults? With the following configuration: <servlet-mapping> <servlet-name>default</servlet-name>

@Annie201

Posted in: #Java #Localhost #Tomcat

With the following configuration:

<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>


then both Tomcat7 and Tomcat6 serves the following URL just fine: 127.0.0.1:8087/mynet/index.html
However, if I reduce the configuration to just mention the CSS pattern:

<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>


Then Tomcat6 works, but Tomcat7 fails with: The requested resource () is not available.

Why is there a difference here?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie201

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme