• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Problem in JSF

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you give a link to the page where I can see the program you are trying out ?


 
imran mansuri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
<h:outputText value="JSF 1.2 Tutorial"/>
</h1>
<h:form id="UserEntryForm">
<h:outputText 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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic