myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Yee <>
Subject Re: EL expression not evaluated in myfaces/Trinidad 1.2 archetype application on Tomcat 6
Date Thu, 03 Mar 2011 14:43:18 GMT
Scott, the archetype generates a simple two page application. The
first page has a inputText where the use is prompted to enter their
name and press a submit button. However, instead of being blank, it
shows so #{}

This is the source of the index.jspx page:
<jsp:root xmlns:jsp="" version="2.0"
          xmlns:tr="" >
  < contentType="text/html;charset=utf-8"/>
    <tr:document title="Apache MyFaces Trinidad Archetype Demo">

          <tr:inputText label="Your name" id="input1"
value="#{}" required="true"/>
          <tr:commandButton id="button1" text="press me"
action="#{helloWorldBacking.send}" />


This is the backing bean
public class HelloWorldBacking

  private String _name = "";

   * default empty constructor
  public HelloWorldBacking()

  //-------------------getter & setter
  public String getName()
    return _name;

  public void setName(String name)
    this._name = name;

   * Method that is backed to a submit button of a form.
  public String send()
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExtendedRenderKitService service = (ExtendedRenderKitService)
      Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
 //   service.addScript(facesContext, "alert('Script added by

    //do real logic
    return ("success");

The Maven archetype I used has a groupId of
org.apache.myfaces.buildtools  the archetypeArtifactId is

I didn't change the the generated sources at all except for commenting
a line in the send() method to prevent a javascript alert from being

I'm running this on a Macbook Pro and have tried it using Tomcat
6.0.32 and 7.0.8.

What shows is "#{}" is the visible value of the
inputText when the first page is displayed.
The second page then displays "Hello #{}. We
hope you enjoy Apache MyFaces Trinidad"

BTW, this is the first time I've deployed a JSF app on tomcat 6 or 7.
I'm not sure if there is anything extra I need to set up. I"m using
the stock distributions.

Thanks for your help!


Sent from my iPhone

On Mar 3, 2011, at 5:21 AM, "Scott O'Bryan" <> wrote:

> An example for one.  ;)
> Might be helpful Richard to send us a code fragment or something and
> let us know what doesn't work.  Maybe we can help..
> On Mar 3, 2011, at 1:25 AM, Richard Yee <> wrote:
>> I generated a basic application from the maven archetype and deployed it to tomcat
6. Although the Trinidad tags are evaluated, the EL expression in the input text box is not
evaluated. What am I missing?
>> Thanks,
>> Richard
>> Sent from my iPhone

View raw message