2
May 21, 2013 3:44:07 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.27 using APR version 1.4.6.
May 21, 2013 3:44:07 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
May 21, 2013 3:44:08 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1d 5 Feb 2013)
May 21, 2013 3:44:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
May 21, 2013 3:44:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
May 21, 2013 3:44:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1591 ms
May 21, 2013 3:44:08 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
May 21, 2013 3:44:08 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.39
May 21, 2013 3:44:08 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\docs
May 21, 2013 3:44:08 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\examples
May 21, 2013 3:44:08 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
May 21, 2013 3:44:08 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
May 21, 2013 3:44:08 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1ce3a26')
May 21, 2013 3:44:08 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\host-manager
May 21, 2013 3:44:08 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\lmsportal-admin
May 21, 2013 3:44:14 PM org.apache.catalina.core.ApplicationContext log
INFO: **No Spring WebApplicationInitializer types detected on classpath**
May 21, 2013 3:44:14 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\manager
May 21, 2013 3:44:14 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Tomcat\webapps\ROOT
May 21, 2013 3:44:14 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
May 21, 2013 3:44:14 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
May 21, 2013 3:44:14 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6429 ms

当我在 Chrome 上浏览 localhost jsp 文件时,它显示“目录列表 For/”,有时它确实显示了文件树。在我的 myeclipse 上运行 tomcat 服务器时出现此错误,将不胜感激有关此错误如何发生的一些信息。

这是我的 web.xml

http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

<welcome-file-list>
    <welcome-file>/WEB-INF/page/index.jsp</welcome-file>
</welcome-file-list>

<error-page>
    <error-code>404</error-code>
    <location>/WEB-INF/page/error/404.jsp</location>
</error-page>
<error-page>
    <error-code>500</error-code>
    <location>/WEB-INF/page/error/404.jsp</location>
</error-page>

<!-- <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext-security.xml</param-value> 
    </context-param> -->

<servlet>
    <servlet-name>lmsadmin</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:lms-admin.xml </param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet>
    <servlet-name>loadRun</servlet-name>
    <servlet-class>com.telecom.lms.portal.admin.service.LoadRunServlet</servlet-class>
    <load-on-startup>3</load-on-startup>
</servlet>

<servlet>
    <servlet-name>ctu-resource-agent</servlet-name>
    <servlet-class>com.myctu.platform.resource.agent.CTUResourceAgentServlet</servlet-class>
    <!-- &#19979;载地址 -->
    <init-param>
        <param-name>resource_proxy</param-name>
        <param-value>http://180.168.60.15:15320/resource-proxy</param-value>
    </init-param>
    <!-- &#21830;户标识 -->
    <init-param>
        <param-name>domain</param-name>
        <param-value>telecom</param-value>
    </init-param>
    <!-- &#31614;名过期时间,单位毫秒 -->
    <init-param>
        <param-name>expire</param-name>
        <param-value>86400000</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>ctu-resource-agent</servlet-name>
    <url-pattern>/ctu-resource-agent</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>lmsadmin</servlet-name>
    <url-pattern>*.html</url-pattern>
</servlet-mapping>

<filter>
    <filter-name>encoding</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>

<filter-mapping>
    <filter-name>encoding</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>

<!-- 单点登录 start -->
<filter>
    <filter-name>CAS Filter</filter-name>
    <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter1</filter-class>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
        <param-value>https://cas.demo.myctu.cn/cas/login</param-value>
    </init-param>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
        <param-value>https://cas.demo.myctu.cn/cas/serviceValidate</param-value>
    </init-param>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
        <param-value>localhost:8080</param-value>
    </init-param>
    <init-param>
        <param-name>excludes</param-name>
        <param-value>*.jpg,*.png,*.js,*.css</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>CAS Filter</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>

<servlet>
    <servlet-name>LogoutServlet</servlet-name>
    <servlet-class>com.telecom.ctu.platform.cas.LogoutServlet</servlet-class>
    <init-param>
        <param-name>edu.yale.its.tp.cas.client.servlet.logout</param-name>
        <param-value> https://cas.demo.myctu.cn/cas/logout </param-value>
    </init-param>
    <init-param>
        <param-name>service</param-name>
        <param-value>http://localhost:8089/lmscore-service</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>LogoutServlet</servlet-name>
    <url-pattern>/logout</url-pattern>
</servlet-mapping>



<!-- 单点登录 end -->

<!-- wabacus start -->
<filter>
    <filter-name>Encoding</filter-name>
    <filter-class>com.wabacusdemo.util.SetCharacterEncodingFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>Encoding</filter-name>
    <url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>Encoding</filter-name>
    <url-pattern>*.wx</url-pattern>
</filter-mapping>

<listener>
    <listener-class>com.wabacus.WabacusServlet</listener-class>
</listener>

<servlet>
    <servlet-name>reportservlet</servlet-name>
    <servlet-class>com.wabacus.WabacusServlet</servlet-class>
    <init-param>
        <param-name>configpath</param-name>
        <param-value>classpath{/reportconfig}</param-value>
    </init-param>
    <load-on-startup>20</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>reportservlet</servlet-name>
    <url-pattern>/ShowReport.wx</url-pattern>
</servlet-mapping>
<jsp-config>
    <taglib>
        <taglib-uri>wabacus</taglib-uri>
        <taglib-location>/WEB-INF/wabacus.tld</taglib-location>
    </taglib>
</jsp-config>

<mime-mapping>  
    <extension>xls</extension>  
    <mime-type>application/vnd.ms-excel</mime-type>  
</mime-mapping>

<mime-mapping>  
    <extension>xlsx</extension>  
    <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>  
</mime-mapping>
<!-- wabacus end -->

<filter>
    <!-- 此名字需要在应用内保证唯一,名字作为产出的监控报表的唯一标识,每一个监控表唯一对应一个名字 -->
    <!-- 请将此fileter至于其他filter的最前面,保证监控数据的有效性 -->
    <filter-name>WebappStatistics</filter-name>
    <filter-class>com.telecom.ctu.platform.common.monitor.WebappStatistics</filter-class>
    <init-param>
        <param-name>name</param-name>
        <param-value>controller.statistics</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>WebappStatistics</filter-name>
    <url-pattern>*.html</url-pattern>
</filter-mapping>

4

3 回答 3

3

我将WebROOT文件目录添加到默认目录,问题解决了。

属性->MyEclipse->部署程序集->添加

于 2013-05-27T03:19:35.137 回答
0

http://localhost:8080/appRoot/page.jspURL生成目录列表对我来说似乎很奇怪。你能用另一个正在运行的应用程序试试你的 Tomcat 服务器吗?Spring WebApplicationInitializer 应该处理 web.xml 文件,其中 Spring 未正确初始化。

于 2013-05-21T09:06:03.740 回答
0

在 Eclipse 中,您可能会在“问题”视图选项卡中获得有关错误的更多信息。Windows -> 显示视图 -> 问题。您将看到实际错误列表。在将现有 Spring 项目导入 STS IDE 时,我曾经收到相同的消息“INFO:在类路径上未检测到 Spring WebApplicationInitializer 类型”。就我而言,lib 文件夹中的 hibernate-3.2.1.ga.jar 已损坏。替换它已经解决了所有编译问题。

于 2013-05-22T14:11:53.637 回答