该项目(命名:'myproject')使用 Spring MVC 框架。默认页面为“index.action”,web.xml 配置如下:
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.action</welcome-file>
</welcome-file-list>
访问http://www.example.com/myproject/时未找到服务器响应 404 ,但访问http://www.example.com/myproject/index.action时工作正常。
任何帮助将不胜感激!