Jsf Tomcat服务器上JavaEE应用程序的Maven依赖项。javaeeapi有什么问题?
我有一个非常简单的hello world Java EE应用程序。index.xhtml如下所示:Jsf Tomcat服务器上JavaEE应用程序的Maven依赖项。javaeeapi有什么问题?,jsf,jakarta-ee,maven,tomcat,Jsf,Jakarta Ee,Maven,Tomcat,我有一个非常简单的hello world Java EE应用程序。index.xhtml如下所示: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="htt
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>JSF 2.0 Hello World</title>
</h:head>
<h:body>
<h3>#{problemBean.helloWorld}</h3>
</h:body>
</html>
嗯,我猜Mojarra的实现库丢失了。尝试将此依赖项添加到pom:
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.19</version>
</dependency>
com.sun.faces
jsf impl
2.1.19
此外,我认为您只需要
javaeeapi
(ee6完整版)或javaeewebapi
(ee6web概要文件)。Hm,我猜Mojarra的实现库缺失了。尝试将此依赖项添加到pom:
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.19</version>
</dependency>
com.sun.faces
jsf impl
2.1.19
此外,我认为您只需要
javaee api
(EE 6完整版)或javaee web api
(EE 6 web概要文件)。我发现添加此依赖项可以让您在tomcat中部署.xhtml文件,而无需在web-INF/lib文件夹中添加任何JAR
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.7</version>
</dependency>
玻璃鱼
javax.faces
2.2.7
我发现添加此依赖项可以让您在tomcat中部署.xhtml文件,而无需在WEB-INF/lib文件夹中添加任何JAR
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.7</version>
</dependency>
玻璃鱼
javax.faces
2.2.7
您使用的是什么应用服务器?您使用的是什么应用服务器?
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.19</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.7</version>
</dependency>