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 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 Android Security Essentials Live Lessons this week in the Android 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: 15961
    
  19

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: 15961
    
  19

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.
 
Similar Threads
Handling session timeout
Managed beans aren't constructed running on JBoss 5.1.0 (works fine with Tomcat 6)
Why does not command button calls action listener?
MyFaces Tomahawk latest 1.1.7-SNAPSHOT problem
Why does JSF creates scripts tags with the attribute 'defer' without my consent?