2013-10-29 554 views
1

当我尝试在tomcat 7上部署WAR文件Web应用程序时出现问题。它昨天正在工作,但我认为web.xml中存在问题。我曾试图按启动按钮,但得到这个消息:失败 - 上下文路径/ CONTROL上的应用程序无法启动

失败 - 在上下文路径/控制应用程序无法启动

谁能帮助我?

的web.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee ;http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
version="3.0"> 

<display-name>Archetype Created Web Application</display-name> 
<filter> 
    <filter-name>LoginFilter</filter-name> 
    <filter-class>org.primefaces.examples.view.LoginFilter</filter-class> 
</filter> 

<!-- Set the login filter to secure all the pages in the /secured/ * path 
    of the application --> 
<filter-mapping> 
    <filter-name>LoginFilter</filter-name> 
    <url-pattern>/secured/ *</url-pattern> 
</filter-mapping> 

<!-- By default go to secured welcome page --> 
<welcome-file-list> 
    <welcome-file>secured/welcome.xhtml</welcome-file> 
</welcome-file-list> 

<filter> 
    <filter-name>urlRewriteFilter</filter-name> 
    <filter-class>org.primefaces.examples.view.UrlRewriteFilter 
    </filter-class> 
</filter> 

<filter-mapping> 
    <filter-name>urlRewriteFilter</filter-name> 
    <url-pattern>*.jsf</url-pattern> 
</filter-mapping> 


<context-param> 
    <param-name>javax.faces.PROJECT_STAGE</param-name> 
    <param-value>Development</param-value> 
</context-param> 

<welcome-file-list> 
    <welcome-file>faces/index.xhtml</welcome-file> 
</welcome-file-list> 

<servlet> 
    <servlet-name>Faces Servlet</servlet-name> 
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
    <load-on-startup>1</load-on-startup> 
</servlet> 

<servlet-mapping> 
    <servlet-name>Faces Servlet</servlet-name> 
    <url-pattern>/faces/ *</url-pattern> 
</servlet-mapping> 

<servlet-mapping> 
    <servlet-name>Faces Servlet</servlet-name> 
    <url-pattern>*.jsf</url-pattern> 
</servlet-mapping> 

<servlet-mapping> 
    <servlet-name>Faces Servlet</servlet-name> 
    <url-pattern>*.faces</url-pattern> 
</servlet-mapping> 

<servlet-mapping> 
    <servlet-name>Faces Servlet</servlet-name> 
    <url-pattern>*.xhtml</url-pattern> 
</servlet-mapping> 

<context-param> 
    <description>State saving method: 'client' or 'server' (=default). See 
     JSF Specification 2.5.2</description> 
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
    <param-value>client</param-value> 
</context-param> 

<context-param> 
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext 
    </param-name> 
    <param-value>resources.application</param-value> 
</context-param> 

<listener> 
    <listener-class>com.sun.faces.config.ConfigureListener 
    </listener-class> 
</listener> 

<context-param> 
    <param-name>primefaces.THEME</param-name> 
    <param-value>custom-theme</param-value> 
</context-param> 
</web-app> 

日志文件:

http://sams-app.com/catalina.out 
+0

堆栈跟踪请。 –

+0

如何从服务器获取Stacktrace ..注意我使用真正的虚拟主机 – user2884425

+0

向您的虚拟主机服务提供商索取。 –

回答

-1

我看你的web.xml中的某些部分似乎被注释。它显示为灰色。您发布的内容似乎也与您的工作环境相同。以下是灰色的部分。


</servlet-mapping> 
<servlet-mapping> 
<servlet-name>Faces Servlet</servlet-name> 
<url-pattern>*.jsf</url-pattern> 
</servlet-mapping> 
<servlet-mapping> 
<servlet-name>Faces Servlet</servlet-name> 
<url-pattern>*.faces</url-pattern> 
</servlet-mapping> 
<servlet-mapping> 
<servlet-name>Faces Servlet</servlet-name> 
<url-pattern>*.xhtml</url-pattern> 
</servlet-mapping> 
<context-param> 
<description>State saving method: 'client' or 'server' (=default). See JSF 
Specification 2.5.2</description> 
<param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
<param-value>client</param-value> 
</context-param> 
<context-param> 
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name> 
<param-value>resources.application</param-value> 
</context-param> 
<listener> 
<listener-class>com.sun.faces.config.ConfigureListener</listener-class> 
</listener> 
<context-param> 
<param-name>primefaces.THEME</param-name> 
<param-value>custom-theme</param-value> 
</context-param> 
    <filter> 
<filter-name>urlRewriteFilter</filter-name> 
<filter-class>org.primefaces.examples.view.UrlRewriteFilter</filter-class> 
</filter> 
<filter-mapping> 
<filter-name>urlRewriteFilter</filter-name> 
<url-pattern>*.jsf</url-pattern> 
</filter-mapping> 

<filter> 
<filter-name>LoginFilter</filter-name> 
<filter-class>org.primefaces.examples.view.LoginFilter</filter-class> 
</filter> 
    <!-- Set the login filter to secure all the pages in the /secured/* path of 
the  application --> 
<filter-mapping> 
<filter-name>LoginFilter</filter-name> 
<url-pattern>/secured/*</url-pattern> 
</filter-mapping> 

<!-- By default go to secured welcome page --> 
<welcome-file-list> 
<welcome-file>secured/welcome.xhtml</welcome-file> 
</welcome-file-list> 

+0

这只是格式。 web.xml中评论的唯一的东西是评论。我也为这个XML代码添加了格式。 –

+0

我已编辑我的代码不会被评论 – user2884425

+0

我已添加日志文件 – user2884425

相关问题