aspose file tools*
The moose likes JSF and the fly likes second time my method is not called on button click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "second time my method is not called on button click " Watch "second time my method is not called on button click " New topic
Author

second time my method is not called on button click

abhishekt tiwari
Greenhorn

Joined: Jan 26, 2011
Posts: 15
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

Joined: Jun 25, 2001
Posts: 16055
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
abhishekt tiwari
Greenhorn

Joined: Jan 26, 2011
Posts: 15
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

Joined: Jan 26, 2011
Posts: 15
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

Joined: Jan 26, 2011
Posts: 15
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

Joined: Jan 26, 2011
Posts: 15


I solved my Problem which i posted
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2850
    
  11

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

Joined: Jan 26, 2011
Posts: 15
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: second time my method is not called on button click