`

web - web.xml - <welcome-file-list>

 
阅读更多

 正确格式 

    <welcome-file-list>
       <welcome-file>index.jsp</welcome-file>
       <welcome-file>index.html</welcome-file>
   </welcome-file-list>

不允许    

  <welcome-file-list>
       <welcome-file>index.do</welcome-file>
   </welcome-file-list>

   上述配置情况下启动服务器,终是报404错误,但我在地址栏手工加入index.do时,页面正常显示。

 原因:<welcome-file>index.jsp </welcome-file> 节点中只能包含HTML、HTM、TEXT文件,不能访问控制器

好的讨论:http://bbs.csdn.net/topics/330080053

分享到:
评论

相关推荐

    Jboss启动报Failed to parse WEB-INFweb.xml; - nested throwable错误

    在本例中,我们需要将错误的&lt;servlet&gt;标签改为&lt;welcome-file-list&gt;标签,正确的配置如下: ``` &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; ``` 其他可能的解决方案 除了...

    tomcat配置文件web.xml与server.xml解析

    &lt;/welcome-file-list&gt; 在上面的配置中,定义了 Welcome 文件的列表,包括 index.html、index.htm 和 index.jsp。 二、server.xml 配置文件 server.xml 配置文件是 Tomcat 服务器的另一个重要配置文件,用于配置 ...

    cas 配置client 1.0 &2.0 及proxy DEMO 说明

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;/web-app&gt; 4 cas client 2.0配置说明 &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app version="2.5" xmlns=...

    最简化velocity的web工程

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.vm&lt;/welcome-file&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;/web-app&gt; 3.index.vm代码 $!isSuccess 4.访问地址 http://IP:端口/vlo/hello ...

    一个在线报名系统

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.html&lt;/welcome-file&gt; &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;welcome-file&gt;default.html&lt;/welcome-file&gt; &lt;welcome-file&gt;...

    Spring MVC 框架应用实例

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;welcome-file&gt;index.html&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;jsp-config&gt; &lt;taglib&gt; &lt;taglib-uri&gt;http://java.sun.com/jsp/jstl/core...

    生活轨迹SSH服务端

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;listener&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt; &lt;!-- 默认找的...

    t淘淘商城项目 商城项目 视频和源码教程 详细

    &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt; &lt;version&gt;${spring.version}&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt; &lt;version&gt;${...

    web.xml详解(web-app_2_3.dtd)

    13. welcome-file-list元素 14. error-page元素 15. taglib元素 16. resource-env-ref元素 17. resource-ref元素 18. security-constraint元素 19. login-config元素 20. security-role元素 21. env...

    SpringStrutsHibernate的配置

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; 把servlet-name等的servlet改为filter就变成了过滤器了。 说明:要继承HttpServlet类 一、 ①处可以随便取一个名字,但一般是和...

    聊天室(ActionScript 3.0实现)

    聊天室(ActionScript 3.0实现)&lt;?xml version="1.0" encoding="UTF-8"?&gt; -&lt;web-app xsi:schemaLocation=...-&lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;/web-app&gt;

    struts2配置2.5版

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;!-- 配置核心拦截器 --&gt; &lt;filter&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;!-- Filter的实现类 struts2.5 --&...

    Spring MVC 入门实例

    48 &lt;/welcome-file-list&gt; 49 50 &lt;jsp-config&gt; 51 &lt;taglib&gt; 52 &lt;taglib-uri&gt;http://java.sun.com/jsp/jstl/core&lt;/taglib-uri&gt; 53 &lt;taglib-location&gt;/WEB-INF/tld/c.tld&lt;/taglib-location&gt; 54 &lt;/taglib&gt; 55 &lt;taglib&gt; ...

    JSF文件上传

    &lt;/welcome-file-list&gt; &lt;/web-app&gt; 上传文件的页面如下: &lt;%@ include file="tags.jsp"%&gt; &lt;f:view&gt; &lt;h:form id="MyForm" enctype="multipart/form-data" &gt; &lt;h:messages globalOnly="true" styleClass="message"/&gt;...

    struts项目搭建

    &lt;/welcome-file-list&gt; &lt;login-config&gt; &lt;auth-method&gt;BASIC&lt;/auth-method&gt; &lt;/login-config&gt; &lt;/web-app&gt; 然后在src目录下新建一个struts.xml文件,内容如下: &lt;!DOCTYPE struts PUBLIC "-//Apache Software ...

    VB编程资源大全(英文源码 其它)

    Copy the file with .scr extension to your computers win directory (Windows for 98, Winnt for NT) and check in screens saver settings.&lt;END&gt;&lt;br&gt;73,Cls_sample_Collection.zip&lt;br&gt;Implement with Class and ...

    基于EXT SSI的简单树实现

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;page/index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;!-- web应用启动时初始化applicationContext --&gt; &lt;listener&gt; &lt;listener-class&gt;org.springframework.web.context....

    Web.xml配置文件[文].pdf

    `&lt;welcome-file-list&gt;`元素用于定义服务器在收到引用一个目录名而不是文件名的URL时,使用哪个文件。 13. `&lt;error-page&gt;`元素 `&lt;error-page&gt;`元素用于定义在返回特定HTTP状态代码时,或者特定类型的异常被抛出时,...

    J2EE中关于web.xml文件的配置

    12. `&lt;welcome-file-list&gt;`:welcome-file-list 元素用于指定服务器在收到引用一个目录名而不是文件名的 URL 时,使用哪个文件。 13. `&lt;error-page&gt;`:error-page 元素用于指定在返回特定 HTTP 状态代码时或特定类型...

    spring_MVC源码

    弃用了struts,用spring mvc框架做了几个项目,感觉都不错,而且使用了注解方式,可以省掉一大堆配置文件。本文主要介绍使用注解方式配置的spring mvc,之前写的spring3.0 mvc和rest小例子...02.&lt;web-app xmlns:xsi=...

Global site tag (gtag.js) - Google Analytics