码头不上来

时间:2012-05-10 15:00:38

标签: web webserver jetty

我在Linux平台上以编程方式启动jetty。它第一次运行良好,但下次它只是挂起,当我转到浏览器时,我只看到目录列表而不是实际的网页。我在RHEL5盒子上使用的Jetty版本是6.1.26(我知道它的版本较旧但是我们的标准)。

当我删除临时文件夹(我使用webapp.setTempDirectory(tempDirectory)设置;我的webapps扩展)并重新启动jetty时,它就可以了。

请帮忙。

提前致谢。

web.xml FYI

`
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" version="2.4"> Name Struts
action org.apache.struts.action.ActionServlet

    <init-param> 
        <param-name>config</param-name> 
        <param-value>/WEB-INF/config/struts-config.xml</param-value> 
    </init-param> 

    <init-param> 
        <param-name>debug</param-name> 
        <param-value>3</param-value> 
    </init-param> 

    <init-param> 
        <param-name>detail</param-name> 
        <param-value>3</param-value> 
    </init-param> 

    <load-on-startup>1</load-on-startup> 
</servlet> 

<servlet-mapping> 
    <servlet-name>action</servlet-name> 
    <url-pattern>*.do</url-pattern> 
</servlet-mapping>

<servlet>
    <servlet-name>DisplayChart</servlet-name>
    <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>DisplayChart</servlet-name>
    <url-pattern>/servlet/DisplayChart</url-pattern>
</servlet-mapping>

<servlet>
    <servlet-name>DisableDynamicJSPReloading</servlet-name>
    <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
    <init-param>
        <param-name>reload-interval</param-name>
        <param-value>-1</param-value>
    </init-param>
    <load-on-startup>3</load-on-startup>
</servlet>

<servlet>
    <display-name>Jersey Webservice Servlet</display-name> 
    <servlet-name>springDispatcher</servlet-name>
    <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
    <init-param> 
        <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> 
        <param-value>com.sun.jersey.api.core.PackagesResourceConfig</param-value> 
    </init-param> 
    <init-param> 
        <param-name>com.sun.jersey.config.property.packages</param-name> 
        <param-value>com.rest.controller</param-value>
    </init-param> 
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>springDispatcher</servlet-name>
    <url-pattern>/webservice/*</url-pattern>
</servlet-mapping>

<listener>      
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>

<listener>
    <listener-class>com.web.listener.BatchProgressorContextListener</listener-class>
</listener>

<context-param>      
    <param-name>contextConfigLocation</param-name>      
    <param-value>classpath:beans-spring.xml</param-value>   
</context-param> 

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

</web-app>

<init-param> <param-name>config</param-name> <param-value>/WEB-INF/config/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet> <servlet-name>DisplayChart</servlet-name> <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class> </servlet> <servlet-mapping> <servlet-name>DisplayChart</servlet-name> <url-pattern>/servlet/DisplayChart</url-pattern> </servlet-mapping> <servlet> <servlet-name>DisableDynamicJSPReloading</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>reload-interval</param-name> <param-value>-1</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <servlet> <display-name>Jersey Webservice Servlet</display-name> <servlet-name>springDispatcher</servlet-name> <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class> <init-param> <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> <param-value>com.sun.jersey.api.core.PackagesResourceConfig</param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>com.rest.controller</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>springDispatcher</servlet-name> <url-pattern>/webservice/*</url-pattern> </servlet-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <listener> <listener-class>com.web.listener.BatchProgressorContextListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:beans-spring.xml</param-value> </context-param> <welcome-file-list> <welcome-file>initForm.jsp</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> </welcome-file-list> </web-app> `

0 个答案:

没有答案