aspose file tools*
The moose likes JSF and the fly likes Problem in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem in JSF" Watch "Problem in JSF" New topic

Problem in JSF

imran mansuri

Joined: Oct 18, 2003
Posts: 5

I am new to JSF. I am trying to execute the program given in Roseindia site. However, the browser does not seems to recognize #{.....} and displays as it is written in JSP.

Please help.

Manu dv

Joined: Jun 30, 2010
Posts: 8
Can you give a link to the page where I can see the program you are trying out ?

It's better to burn out than to fade away
imran mansuri

Joined: Oct 18, 2003
Posts: 5
It is not on live url. It is in internal url.

The problem is when i write following code :

<%@ taglib prefix="f" uri="" %>
<%@ taglib prefix="h" uri="" %>

<title>enter your name page</title>
<hutputText value="JSF 1.2 Tutorial"/>
<h:form id="UserEntryForm">
<hutputText value="Enter Your Name:"/>
<h:inputText value="#{UserBean.userName}"></h:inputText>
<h:commandButton action="welcome" value="OK" />

It prints following:

JSF 1.2 Tutorial
Enter Your Name:#{UserBean.userName} OK

in browser.

where blue colored text is in text bxo and orange colored text is button.
Manu dv

Joined: Jun 30, 2010
Posts: 8
may be it's a dumb reply, but is it the (a) preview pane you are talking about or (b) the actual app deployed on the web server and viewed through browser.
If it (a) then don't worry about it it will be ok when you actually deploy it.

if it's (b) then you must have felt like after reading the above two line.
In that case I don't have any concrete suggestions coz this never happened to me before. However you could check if your project path includes the jsf implementation jars and that the 'UserBean' has proper entry in <managed-bean> section.
Pardha Reddy

Joined: Mar 11, 2010
Posts: 17
I guess you just run the first example of RoseIndia.

Make sure you write a java file with name UserBean and a property with getter /setter methods named userName in that. Define this java file in faces-config with <managed-bean> and <managed-property> attributes.

If you go through further in the same site, they might have provided all these bean and config info.

I agree. Here's the link:
subject: Problem in JSF