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 Need help in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Need help in JSF" Watch "Need help in JSF" New topic
Author

Need help in JSF

shambhu kumar
Greenhorn

Joined: Aug 07, 2008
Posts: 18
Hi,
I am new developer in jsf.
I want to create a simple jsf application.

1)Login page
2)Success page
3)failure page


I did this.
But now I want to show the user first name and last name in success page.

So, how and where to set values.(Suppose two classes are their LoginUser and Customer)
LoginUser is having userId and password
Customer having firstName,lastName,email etc.

I am able to retrieve from the database. But for making it simple, Just hard code in java class ie. LoginUser.validateUser().

Suppose I am calling validateUser() on click.

Then what to write in validateUser(){}
I tried this
public String validateUser()
{

Customer customer = new Customer("shambhu","kumar","test@test.com");
return "success";//Suppose it is successful pid password check
}

customer is already set in facesConfig

Thank in advance.
Vinay Singh
Ranch Hand

Joined: Dec 15, 2004
Posts: 174
Look at this JSF Tutorial for beginners. It has step by step guide for creating your first application

http://www.skill-guru.com/blog/2009/08/10/319/

Hope this helps


Technical quiz and interview questions   SCJP 6 mock practice test
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help in JSF
 
Similar Threads
Redirecting to same page, keep same values in dropdown
Remove form fields from URL during forward
Struts2 newbee - Problem when using form tag
Spring Struts implementation for Database conncetion problem in Login module
null value at welcome.jsp