Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help in JSF

 
shambhu kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic