gpt4 book ai didi

java - 找不到 WebApplicationContext : no ContextLoaderListener registered?

转载 作者:行者123 更新时间:2023-11-29 05:14:40 25 4
gpt4 key购买 nike

<分区>

当我使用 JSF 时,我能够加载任何 xhtml 页面,然后我想添加 spring。我去了文档 jsf spring integration并在我的 faces-config.xml 中添加了 el-resolver:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<application>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
</application>
</faces-config>

现在,当我尝试加载页面时出现错误:

javax.servlet.ServletException: No WebApplicationContext found: no ContextLoaderListener registered? javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com