jsp welcome file not called
I have a JSP web application deployed to tomcat. The url of the application is http://servername/app
The web.xml contains welcome-file-list as below.
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="mobile" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-开发者_如何学JAVAfile>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Now, when we access http://servername/app the application is not accessible. But, if we access the url as http://servername/app/, then the application is accessible.
I need the application to be application without the trialing / character.
Please help!
This can happen when you've a servlet mapped on /
which is taking over the job of the servletcontainer's builtin default servlet who is the one responsible for going to the right root path. So either fix your servlet to do the same or map it on a more specific url pattern.
精彩评论