Before I was using JSF, the following code was working in JSP files:
<c:if test="${not (empty request.error)}">
Error: ${request.getAttribute("error")}
</c:if>
Now, when I am using JSF, I am getting this error:
/login.xhtml @24,51 test="${not (empty request.error)}" /login.xhtml @24,51 test="${not (empty request.error)}": Property 'error' not found on type org.apache.catalina.connector.RequestFacade
What is the problem/solution here? The editor does not underline anything.
Whole 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>