0

I am currently working on a project that I would like to migrate over to RichFaces 4.2.3 from version 3.3.3. and JSF1.2 into JSF2.0 .
After deploying my project getting some strange kind of error.
"org.apache.jasper.JasperException: /Web/login.jsp(21,20) #{...} is not allowed in template text"
Here is my login.jsp file

<code>


  <?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!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:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

</head>
<body>
    <h1>Registration is successful.</h1>
    <a4j:commandButton value="LOGIN"  
        action="#{userBean.validateUser}" />
</body>
</html>
<code>

More strange point this error is occured only with action tag
action="#{userBean.validateUser}" and work with value="#{userBean.pwd}"

Guys please try to help me out from here, i already waste my whole day with this issue.
Thanks in Advance.

Jarem Cook
  • 13
  • 1
  • 2

2 Answers2

1

It looks like richfaces 4 and onwards does not support JSPs

#{...} is not allowed in template text

Community
  • 1
  • 1
Jazzepi
  • 4,722
  • 6
  • 49
  • 73
1

JSP is deprecated since JSF 2.0. All component libraries which are designed for JSF 2.0 from ground on won't support JSP anymore. This includes among others RichFaces 4.x. RichFaces 3.x is a JSF 1.x compatible component library which can also be used on JSF 2.0. As it's originally JSF 1.x compatible, it just supports JSP.

If you need to migrate to RichFaces 4.x, you should also migrate from JSP to Facelets (XHTML).

See also:

Community
  • 1
  • 1
BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452