Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring mvc 当我访问同一个Tomcat中的2个页面时,Tomcat停止工作_Spring Mvc_Spring Security_Tomcat7 - Fatal编程技术网

Spring mvc 当我访问同一个Tomcat中的2个页面时,Tomcat停止工作

Spring mvc 当我访问同一个Tomcat中的2个页面时,Tomcat停止工作,spring-mvc,spring-security,tomcat7,Spring Mvc,Spring Security,Tomcat7,我知道这可能是个糟糕的问题,但也许有人以前有过这个问题 我用下面列出的框架创建了两个页面,并用不同的名称将它们放在同一个tomcat7中。当我访问它们时,Tomcat停止响应,我得到以下错误: Exception in thread "http-bio-80-exec-9" Exception in thread "http-bio-80-exec-1" Exception in thread "http-bio-80-exec-10" Exception in thread "http-bio

我知道这可能是个糟糕的问题,但也许有人以前有过这个问题

我用下面列出的框架创建了两个页面,并用不同的名称将它们放在同一个tomcat7中。当我访问它们时,Tomcat停止响应,我得到以下错误:

Exception in thread "http-bio-80-exec-9" Exception in thread "http-bio-80-exec-1" Exception in thread "http-bio-80-exec-10" Exception in thread "http-bio-80-exec-13" Exception in thread "Timer-1" Exception in thread "Timer-0" 
当我只使用其中一个时,一切都按预期进行。 我第一次尝试部署它们时,由于使用相同的日志或其他内容而出错。所以我更新了web.xml文件

 <context-param>
    <param-name>log4jExposeWebAppRoot</param-name>
    <param-value>false</param-value>
 </context-param>

log4jExposeWebAppRoot
假的
网站“起作用”。只是我得到了这个错误

Web.xml在两个项目中看起来相似:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" 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">
    <display-name>Spring Security Tutorial</display-name>


    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/classes/log4j.properties</param-value>
    </context-param>
    <context-param>
        <param-name>log4jExposeWebAppRoot</param-name>
        <param-value>false</param-value>
    </context-param> 

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
        /WEB-INF/spring-security.xml

        /WEB-INF/applicationContext.xml
        /WEB-INF/spring-quartz.xml
        </param-value>
    </context-param>

    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>dark-hive-custom</param-value>
    </context-param>



    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>

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

          <listener>
        <listener-class>
            org.springframework.web.context.request.RequestContextListener
        </listener-class>
      </listener>
    <filter>
            <filter-name>springSecurityFilterChain</filter-name>
            <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>

    <filter-mapping>
            <filter-name>springSecurityFilterChain</filter-name>
            <url-pattern>/*</url-pattern>
    </filter-mapping>


    <context-param>
        <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
        <param-value>true</param-value>
    </context-param>


<!-- PRIMEFACES -->
    <filter>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
        <init-param>
        <param-name>thresholdSize</param-name>
            <param-value>104857600</param-value>
        </init-param>
        <init-param>
            <param-name>uploadDirectory</param-name>
            <param-value>D:/tmp/</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>



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

 <security-constraint>
    <display-name>Restrict direct access to XHTML files</display-name>
    <web-resource-collection>
        <web-resource-name>XHTML files</web-resource-name>
        <url-pattern>*.xhtml</url-pattern>
    </web-resource-collection>
    <auth-constraint />
</security-constraint> 


  <!-- Map these files with JSF -->
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>

    <welcome-file-list>
        <welcome-file>/jsp/home.jsf</welcome-file>
    </welcome-file-list>
    <error-page>
        <exception-type>org.springframework.security.access.AccessDeniedException</exception-type>
        <location>/jsp/access/login.jsf</location>
    </error-page>

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




</web-app>

春季安全教程
log4jConfigLocation
/WEB-INF/classes/log4j.properties
log4jExposeWebAppRoot
假的
上下文配置位置
/WEB-INF/spring-security.xml
/WEB-INF/applicationContext.xml
/WEB-INF/spring-quartz.xml
主题
黑蜂巢习俗
org.springframework.web.util.Log4jConfigListener
org.springframework.web.context.ContextLoaderListener
org.springframework.web.context.request.RequestContextListener
springSecurityFilterChain
org.springframework.web.filter.DelegatingFilterProxy
springSecurityFilterChain
/*
javax.faces.FACELETS\u跳过\u注释
真的
PrimeFaces文件上载筛选器
org.primefaces.webapp.filter.FileUploadFilter
阈值大小
104857600
上传目录
D:/tmp/
PrimeFaces文件上载筛选器
Facesservlet
Facesservlet
javax.faces.webapp.FacesServlet
1.
限制对XHTML文件的直接访问
XHTML文件
*.xhtml
Facesservlet
*.xhtml
Facesservlet
*.jsf
/jsp/home.jsf
org.springframework.security.access.AccessDeniedException
/jsp/access/login.jsf
javax.servlet.jsp.jstl.fmt.localizationContext
资源.应用

您发布的错误不完整。请张贴整个堆栈跟踪。我添加了一些更多的信息,但这是我得到的全部(不确定是否与我的问题有关)。正如我猜想的,它可能与数据库的连接有关,因为直到我没有从数据库网站工作中获得任何东西。谢谢你的帮助。