Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3669960
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:18:23+00:00 2026-05-19T02:18:23+00:00

I have a big problem with my application and the memory. The application (java

  • 0

I have a big problem with my application and the memory. The application (java with jsf/richfaces/facelet) is used by some 7000 users simultaneously.

By default, the variable com.sun.faces.numberOfViewsInSession is set to 15 in the web.xml. This variable create a tree of views and jsf retrieve a specific view during 15 click backwards.

For example, I have 3 screens for an application and I use firefox. I go in third screen in a first tab. In a second tab, I have the first screen and I click on the next button, jsf retrieve the first screen and go to the second.

This mechanism is great but it consumes a lot of memory (25Mo by session for me) and when you multipy this number by 7000, I need 175 Go of memory, it’s impossible.

So I tried to set com.sun.faces.numberOfViewsInSession equal to 1 (3Mo by session).

But with my example, when I click in the second tab on the next button I get the next error:

javax.servlet.ServletException: viewId:/private/pages/data/dataView.faces - View /private/pages/data/dataView.faces could not be restored.
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at fr.generali.mezzo.front.commun.performance.filters.PerformanceFilter.doFilter(PerformanceFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)

This error is logical because my numberOfViewsInSession is 1.

So, my question is:

Given that I know data which are in the view (for the second tab), how can I do to catch the exception and create a new view for my user ?

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:18:24+00:00Added an answer on May 19, 2026 at 2:18 am

    Restoring the view manually by exploiting the specific knowledge you have about your application is maybe not a task for the faint-hearted.

    If you would like to follow that path, I think you should not attempt to catch the exception, but to take advantage of the StateManager API in JSF. This allows you to customize the way how the JSF framework manages its view state.

    Do note that this is an advanced topic. Or in Ed Burns’ (JSF spec lead) words:

    View state management is a complex business, and few application developers will have to worry about customizing it.

    That said, if you’re not already using JSF 2.0, then I highly recommend upgrading to this. A big new feature in JSF 2.0 is Partial State Saving. This dramatically reduces the amount of memory needed to store state.

    Yet another option, which I guess you might have already considered seeing you have knowledge of parameters like com.sun.faces.numberOfViewsInSession is using state on client. This stores the view state in hidden fields, and basically given you an unlimited memory since the client is used as distributed memory. Of course this comes at the expensive of increased network overhead. In case of AJAX this overhead might be so large that it’s impossible to consider.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a big web application running in perl CGI. It's running ok, it's
i have some big xslt crashing iis (StackOverflowException) when loading an XslCompiledTransform while the
I have an application that's a mix of Java and C++ on Solaris. The
I have big problem. Lets look on the code below: protected void Application_AuthenticateRequest(object sender,
I ran into a big problem in moving my application to Rails 3. I
We have a big application having 13 modules. We want to create war file
We have a big application having 13 modules. Depending on the customer requirement, we
I have had a few problems with log files growing too big on my
I have big issue with url-rewriting for IIS 7.0. I've written simple module for
How would you maintain the legacy applications that: Has no unit tests have big

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.