This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

second time my method is not called on button click

 
abhishekt tiwari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IN JSF
I have called one method which return array size
if array size is greater than 0 and my userid and password is right then it goes on welcome page its working fine
if i put the wrong password it will kept same page this is also fine

but seond time when i put right password and i click on button it is not going on welcome page
because my array size is still 0


why


 
Tim Holloway
Saloon Keeper
Pie
Posts: 17987
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Abishekt!

My standard disclaimer is that do-it-yourself login code is a Bad Thing, no matter how many Java books use it as an example. Apps that manage their own security are invariably insecure.

However, at a purely technical level, it looks like your backing bean has Request Scope. JSF requires Session Scope in a lot of places that other Java web frameworks don't.
 
abhishekt tiwari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Welcome to the JavaRanch, Abishekt!

My standard disclaimer is that do-it-yourself login code is a Bad Thing, no matter how many Java books use it as an example. Apps that manage their own security are invariably insecure.

However, at a purely technical level, it looks like your backing bean has Request Scope. JSF requires Session Scope in a lot of places that other Java web frameworks don't.


can you suggest me for any visual JSF Book with netbeans plzzzzzzzzzzz..
because i want to develop my application in JSF
 
abhishekt tiwari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abhishekt tiwari wrote:
Tim Holloway wrote:Welcome to the JavaRanch, Abishekt!

My standard disclaimer is that do-it-yourself login code is a Bad Thing, no matter how many Java books use it as an example. Apps that manage their own security are invariably insecure.

However, at a purely technical level, it looks like your backing bean has Request Scope. JSF requires Session Scope in a lot of places that other Java web frameworks don't.



Thanls for reply...
But I have no where used request Bean or Scope in my Application


can you suggest me for any visual JSF Book with netbeans plzzzzzzzzzzz..
because i want to develop my application in JSF
 
abhishekt tiwari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Welcome to the JavaRanch, Abishekt!

My standard disclaimer is that do-it-yourself login code is a Bad Thing, no matter how many Java books use it as an example. Apps that manage their own security are invariably insecure.

However, at a purely technical level, it looks like your backing bean has Request Scope. JSF requires Session Scope in a lot of places that other Java web frameworks don't.



Ranch my welcome page is having request Scope and rest of all beans with Session Scope

So is this fine but
Still my button click is not working for second time

Kindly help me please
 
abhishekt tiwari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I solved my Problem which i posted
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations!

It's a great feeling to solve your own problem. Please post a short description of how you solved it here. That way anyone reading this thread now or in the future can share in the benefits.
 
abhishekt tiwari
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg Charles wrote:Congratulations!

It's a great feeling to solve your own problem. Please post a short description of how you solved it here. That way anyone reading this thread now or in the future can share in the benefits.


Data is coming from database into the arrayList so size become >1 then it goes on home pag ,Second time connection was close so data is not travell from the database so array size is 0 ,thats the reason second time it does not going on home Page
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic