• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having a great deal of dificulty in gettting started with JSF development. I've followed a few online tutorials and have managed to get a very simple JSF application to work using Eclipse and Apache Tomcat 6.0.26. Unfotunately, however, when I try to reference a backing bean the page fails to load. I receive a HTTP 500 error and the following message "org.apache.jasper.JasperException: /hello.jsp(19,25) #{...} is not allowed in template text".

I've seen other posts related to this error (including on this forum), but have not been able to make any sense of them - i.e. its not clear to me what the root cause is and what corrective action to take.

The tutorial that I was working through when I encountered this error is "Essential JSF, Facelets & JBoss Seam" - this asked me to download and configure the following libraries within Eclipse:

- The SUN reference implementation of Java Server Faces - i.e. the 2.0.2 binary bundle of the "Project Mojarra".
- The JSTL library from https://maven-repository.dev.java.net/repository/jstl/jars

These libraries were then added to the Exlipse preferences... in an effort to get things to work I also added the jsf-api.jar, jsf-impl.jar, and jstl-1.2.jar files to the WEB-INF/lib folder of my project...

If anyone can help me understand what I'm doing wrong I'd greately appreciate it - am I missing some library, do I need to somehow need to configure something else in Apache?


My hello.jsp is:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</head>
<body>

<f:view>
<h:form>
<h:panelGrid border="1" columns="2">
<h:outputText value="Name"></h:outputText>

<h:inputText value="#{loginBean.name}"></h:inputText>
<h:outputText value="Password"></h:outputText>
<h:inputSecret value="#{loginBean.password}"></h:inputSecret>
</h:panelGrid><h:commandButton value="Login" action="login"></h:commandButton>

</h:form>
</f:view>

</body>
</html>
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the web.xml and faces-config.xml

Thanks
Pradeep
 
Greenhorn
Posts: 18
Tomcat Server Java Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

Even i have the same problem.

Here are my environment details:

JSF: 1.2.9
RichFaces: 3.3.3
Application Server: Tomcat 6.0.29
JRE: 6


Exception which I got:



Here is my include.jsp Page where i have importing tag libs



Here is my manageUser.jsp where i am using <a4j:commandButton>



Here is web.xml of my project



Here is faces-config.xml of my project




Please help me out, it stops my work.

thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic