• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

EL not evaluated

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
the following code line is not being evaluated


<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<h: outputText value="#{UserBean.userName}" />to JSF 1.2 World!
i have stored the bean value as "welcome"
i should get the output as welcome to jsf 1.2 world

but i am simply getting
#{UserBean.userName} to JSF 1.2 World!

what am i doing wrong

Please help
Krishan

 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is usually because the web.xml specifies the wrong servlet container. What does your web.xml say?
 
Saloon Keeper
Posts: 24804
172
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim McGuire wrote:This is usually because the web.xml specifies the wrong servlet container. What does your web.xml say?



:confused:

I don't think the term "servlet container" really applies here - that's more about the application server program itself. But this particular problem of JSPs not evaluating EL is common for people who don't realize the difference between the jsp file (resource) and the web URL that consumes that resource, submitting a URL that pulls the file directly instead of routing it via the FacesServlet. And yes, web.xml controls how URLs are routed.

Someone else just asked the same question, so I recommend searching this forum for the detailed answer given there.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know why I wrote servlet container. I meant that the web.xml specifies the wrong version in the web-app tag. That was my problem on at least one past occasion.
 
reply
    Bookmark Topic Watch Topic
  • New Topic