在myeclipse上部署了一个Athena3项目,web root-folder为/WebRoot,Web context-root为/athena。部署成功后输入http://localhost:8080/athena/index/index.htm能显示首页,但我找不到这个路径的文件。不知道这个路径是怎样转换到首页的,希望牛人能解答下!
解决方案 »
- 密码框安全控件
- ACTION里面注册script脚本怎么写啊?
- http和mms都能访问。有什么区别?
- 中文乱码问题
- eclipse+tomcat5.0 开发jsp连接MYSQL的问题,急!搞了2天了!
- 如何测试服务器http性能和数据库MYSQL的性能,谢谢学哥们!
- 怎么把从数据库里读出来的数据放到文本域里,让文本域来显示???
- access数据库无法使用group by?【100分】
- 真心菜鸟求大神,五一折磨死我了。问题是<a>标签里?号后面怎么写,把checkbox的name传到servlet里
- 不能运行index.jsp??
- 类似百度文库的文件查看问题
- 遇到一个jsp中嵌入applet的问题,急求解决办法
查看web.xml里配置文件,有没有
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<web-app 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">
<!-- context-param 元素用来设定web站台的环境参数(context),它包含两个子元素:
param-name和param-value.<param-name>参数名称</param-name>设定Context名称
<param-value>值</param-value>设定Context名称的值 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring*.xml</param-value>
</context-param> <context-param>
<param-name>error</param-name>
<param-value>/commons/error.jsp</param-value>
</context-param> <!-- 用于初始化Spring容器的Listener -->
<!-- 利用ContextLoaderListenter来加载dao、service级别的context,而对于struts的action,用ContextLoaderPlugIn加载。 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!--系统初始化 --> <listener>
<listener-class>com.hongwei.athena.web.listener.InitSystemListener</listener-class>
</listener>
<!-- openSession的作用在于在jsp显示之后再 关闭session-->
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<!-- singleSession默认为true,若设为false则等于没用OpenSessionInView ,还有一种是prototype-->
<init-param>
<param-name>singleSession</param-name>
<param-value>true</param-value>
</init-param>
</filter> <filter-mapping>
<filter-name>OpenSessionInViewFilter</filter-name>
<url-pattern>*.htm</url-pattern>
</filter-mapping> <!-- 用于生成IMG的servlet -->
<servlet>
<servlet-name>img</servlet-name>
<servlet-class>com.framework.commons.utils.AuthImage</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>img</servlet-name>
<url-pattern>/img</url-pattern>
</servlet-mapping> <!-- 配置Struts2的CleanUp的过滤器 -->
<filter>
<filter-name>struts2-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2-cleanup</filter-name>
<url-pattern>*.htm</url-pattern>
</filter-mapping>
<!-- 配置装饰器sitemesh -->
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 配置Struts2核心过滤-->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.htm</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<!-- Character Encoding filter -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<error-page>
<error-code>500</error-code>
<location>/WEB-INF/jsp/error/error.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/WEB-INF/jsp/error/error.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/WEB-INF/jsp/error/error.jsp</location>
</error-page>
<servlet>
<servlet-name>JSPSupportServlet</servlet-name>
<servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
</web-app>