Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Baazi Reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Baazi Reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18020
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20768
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic