gpt4 book ai didi

maven - JSF Base64 错误?

转载 作者:行者123 更新时间:2023-11-28 22:20:15 24 4
gpt4 key购买 nike

我正在使用 JSF(使用 Maven、Eclipse 和 Tomcat 7)构建一个页面。使用 JSF 进行开发对我来说是新的,但是对于一个大学项目,我们必须使用 JSF。我阅读了很多关于 JSF 入门的教程,我可以自己解决很多问题。

现在我收到一个由 MyFaces 生成的错误。它说:

An Error Occurred:
org/apache/commons/codec/binary/Base64

viewId=/eingabe.xhtml
location=/Users/USERNAME/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/NewProject/index.xhtml
phaseId=RENDER_RESPONSE(6)

Caused by:
java.lang.ClassNotFoundException - org.apache.commons.codec.binary.Base64
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)

index.html:

<?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">
<head>
<title>Index</title>
</head>
<body>

<h:form>
<h:outputLabel value="Name:" for="name"></h:outputLabel>
<h:inputText id="name" value="#{customer.name}"></h:inputText>
<h:commandButton id="save" action="#{customer.save}" value="Save"></h:commandButton>
</h:form>

</body>
</html>

错误是由 MyFaces 而不是 Apache 产生的。我不知道我必须寻找什么以及错误来自何处......

最佳答案

看来你的应用依赖Apache Commons Codec .

您需要获取jar文件并将其添加到WEB-INF/lib。

关于maven - JSF Base64 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23886401/

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