aspose file tools*
The moose likes JSF and the fly likes How to prevent the client to open too many views after login. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to prevent the client to open too many views after login." Watch "How to prevent the client to open too many views after login." New topic
Author

How to prevent the client to open too many views after login.

Baazi Reddy
Greenhorn

Joined: Jun 28, 2012
Posts: 11
My requirement is to prevent user from opening too many views after login with jsf2.0.

And I used org.apache.NumberOfViewsInSession configuration in web.xml,but it is not working.

My code is

can any one of you solve this problem.

Thanks in advance,
Baazi
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

You have no control whatsoever over how many tabs/windows a client may open. That is determined solely by whatever client program (browser) the client is using.

The parameters you are setting control how many pre-compiled Views are tracked by the server. Once that limit is exceeded, older views are discarded, and attempts to retrieve them will result in a ViewExpiredException. In other words, it's controlling the size of a cache, not the limits of what the end user can do.


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

Joined: Jun 28, 2012
Posts: 11
Hello Tim Holloway ,

First Iam very thankful for your quick response.

Can you please tell me deatily to prevent user to open too many tabs after Login with Jsf. I have to implement this avoiding multiple tabs opening in my application since we have to provide security to end user.

Thanks,
Baazi.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

As I said before. You cannot control how many tabs or windows the client opens. This is not something that the server has any control over. It is not a JSF thing, it is a general Web thing.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Perhaps you should step back a bit. Try explaining why allowing the user to open more than one view equates to failing to provide security to the end user.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to prevent the client to open too many views after login.