File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem in JSF" Watch "Problem in JSF" New topic
Author

Problem in JSF

imran mansuri
Greenhorn

Joined: Oct 18, 2003
Posts: 5
Hi,

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
Greenhorn

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
Greenhorn

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="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>


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

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
Greenhorn

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
Greenhorn

Joined: Mar 11, 2010
Posts: 15
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.

Thanks
Pardha
 
 
subject: Problem in JSF
 
Similar Threads
jafvalidations-ajax problem
JSF version
help needed in jsf
CachedRowSet with JSF
jsf tutorial