相关疑难解决方法(0)

Wildfly 启动时出现错误。javax.faces.FacesException:无法找到 CDI BeanManager

我已经使用 WildFly 18(jdk-13.0.1)在 eclipse 中编写了我的第一个 JSF hello world 程序。,Windows 10。

Wildfly 主页和管理控制台工作正常,但从 url 执行程序时http://localhost:8080/jsf1/faces/WEB-INF/helloworld.xhtml出现404 - Not Found错误。我在 url 上遇到同样的错误http://localhost:8080/jsf1

这是 web.xml 文件

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
  <display-name>jsf1</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</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>
</web-app>
Run Code Online (Sandbox Code Playgroud)

下面是 Wildfly 服务器日志

2020-01-06 10:59:19,677 INFO  [org.jboss.as.patching] (MSC service thread 1-2) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: …
Run Code Online (Sandbox Code Playgroud)

jsf jboss wildfly

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

jboss ×1

jsf ×1

wildfly ×1