`

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

分享到:
评论

相关推荐

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

    spring_MVC源码

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

    servlet3.0新特性源代码

    &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-list&gt; &lt;/web-app&gt; */ @SuppressWarnings(...

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

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

    cms后台管理

    &lt;/welcome-file-list&gt; 通过以上标签找到应该加载哪一个页面 &lt;servlet&gt; &lt;servlet-name&gt;JeeCmsFront&lt;/servlet-name&gt; &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; &lt;init-...

    Windouws 64 位Tomcat7.0.40 + 64位jdk1.7.0u21 绿色版.part1

    │ │ web.xml │ │ │ └─Catalina │ └─localhost ├─jdk1.7.0_21 │ │ COPYRIGHT │ │ LICENSE │ │ README.html │ │ release │ │ src.zip │ │ THIRDPARTYLICENSEREADME-JAVAFX.txt │ │ ...

Global site tag (gtag.js) - Google Analytics