• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic