JSFを使用する前は、次のコードがJSPファイルで機能していました。
<c:if test="${not (empty request.error)}">
Error: ${request.getAttribute("error")}
</c:if>
現在、JSFを使用していると、次のエラーが発生します。
/login.xhtml @ 24,51 test = "$ {not(empty request.error)}" /login.xhtml @ 24,51 test = "$ {not(empty request.error)}":プロパティ'error' notタイプorg.apache.catalina.connector.RequestFacadeで見つかりました
ここでの問題/解決策は何ですか?エディターは何も下線を付けません。
login.xhtml全体:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
template="./template.xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:define name="userBar">
<form method="POST" action="Login">
<table>
<tr>
<td>Login</td>
<td><input type="text" name="login" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Login" /></td>
</tr>
</table>
</form>
<c:if test="${not (empty request.error)}">
Error: ${request.getAttribute("error")}
</c:if>
</ui:define>
<ui:define name="content">
content
</ui:define>
</ui:composition>