`

web.xml中的welcome-file-list问题解决

阅读更多
我用structs2时候web.xml配置如下
<welcome-file-list>
  <welcome-file>index.htm</welcome-file>
</welcome-file-list>
启动服务器,终是报404错误,但我在地址栏手工加入index.htm时,页面正常显示.
解决:
tomcat 会去检查有没有index.htm这个文件.
先读取 welcome list,然后取得第一个index,然后到web中的路径中查找有没有这个文件,没有继续第二个.依次下去。在WebRoot下建立一个index.htm空文件就可以正常访问.
分享到:
评论

相关推荐

    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...

    最简化velocity的web工程

    2.web.xml配置文件 &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=...

    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-uri&gt;...

    一个在线报名系统

    &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;...

    servlet3.0新特性源代码

    import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet....

    聊天室(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;

    生活轨迹SSH服务端

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

    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类 一、 ①处可以随便取一个名字,但一般是和...

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

    &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="http://java.sun.com/xml/ns/javaee" xmlns:xsi=...

    企业人力资源管理项目SSH+EXT+MySQL+MD5

    在web.xml的display-name标签与welcome-file-list标签中加入一下代码 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* org.springframework.web.context....

    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-name&gt;struts2&lt;/filter-name&gt; &lt;!-- Filter的实现类 struts2.5 --&gt; ...

    linux全志R16的linux系统编译的资料_20170502_1655.7z

    Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. dragonboard 2. linux 3. tina Choice: 2 All available kernel: 0. linux-3.4 ...

    BIG文件编辑器

    on the file list of your BIG file. A window will come up telling you that FinalBIG needs to activate EditMode. Accept that, but you really should back up any original BIG files before saving. That磗 ...

    Spring MVC 入门实例

    45 &lt;welcome-file-list&gt; 46 &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; 47 &lt;welcome-file&gt;index.html&lt;/welcome-file&gt; 48 &lt;/welcome-file-list&gt; 49 50 &lt;jsp-config&gt; 51 52 &lt;taglib-uri&gt;...

    项目源码-java计算机配件报价系统项目

    【项目源码】-java计算机配件报价系统项目 系统主要功能包括: ...后台功能模块:修改个人信息、管理员管理、注册用户管理、类别信息管理、类别信息添加、散件... &lt;welcome-file-list&gt; &lt;welcome-file&gt;/qiantai/default.

    spring_MVC源码

    23. &lt;/welcome-file-list&gt; 24.&lt;/web-app&gt; spring-servlet,主要配置controller的信息 [java] view plaincopy 01.&lt;?xml version="1.0" encoding="UTF-8"?&gt; 02. 03. xmlns:xsi=...

    基于EXT SSI的简单树实现

    &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt; &lt;context-param&gt; &lt;description&gt;spring初始配置 &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-...

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

     |--com.taotao.manage.web  |--com.taotao.manage.service  |--com.taotao.manage.mapper  |--com.taotao.manage.pojo 3.4. 创建taotao-parent 3.4.1. 创建maven工程 3.4.2. 修改pom文件   xsi:...

    struts项目搭建

    &lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &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文件...

    cms后台管理

    以cms_content_list为例,首先,每一个标签的声明都是在jeecms-context.xml中进行的, &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...

Global site tag (gtag.js) - Google Analytics