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

  • SEARCH
  • Home
  • 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 6947577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:42:39+00:00 2026-05-27T13:42:39+00:00

I am not able to understand what is the function of this line in

  • 0

I am not able to understand what is the function of this line in web.xml

<context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
</context-param>

I have read that the NetBeans default is client. I’ve just faced an issue that I have many beans in my application, and the <param-value> was set to client, so I was getting

java.io.NotSerializableException

error although my beans were Serializable (i.e. they implemented the Serializable interface.). My beans were in @ViewScope. But when I changed it to server, things are going to work. Why? What is the difference when I use client and server. Can anyone explain me with the help of an example.

Thanks

  • 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-27T13:42:40+00:00Added an answer on May 27, 2026 at 1:42 pm
    java.io.NotSerializableException
    

    This kind of exception has usually a message in the root cause which shows the fully qualified class name of the class which doesn’t implement Serializable. You should pay close attention to this message to learn about which class it is talking about and then let it implement Serializable accordingly.

    Often, making only your managed bean classes serializable is not always sufficient. You also need to ensure that each of its properties is also serializable. Most standard types like String, Long, etc implement all already Serializable. But (custom) complex types such as nested beans, entities or EJBs should each also be serializable. If something is not really implementable as Serializable, such as InputStream, then you should either redesign the model or make it transient (and keep in mind that it will be null after deserialization).


    What is the difference when i use client and server

    First some background information: Why JSF saves the state of UI components on server?

    The main technical difference is that the client setting stores the entire view state as the value of the javax.faces.ViewState hidden input field in the generated HTML output and that the server setting stores it in the session along with an unique ID which is in turn referenced as the value of the javax.faces.ViewState hidden input field.

    So, setting to client increases the network bandwidth usage but decreases the server memory usage and setting to server does the other way round. Setting to client has however an additional functional advantage: it prevents ViewExpiredExceptions when the session has expired or when the client opens too many views.

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

Sidebar

Related Questions

I am not able to understand how to rotate the image. I am trying
I am not able to understand few things on the Garbage collection. Firstly, how
I'm not able to understand the difference between Thread vs ThreadPool. Consider i've to
I have a legacy script which I am not able to understand. The script
I am relatively a new Android developer and I am not able to understand
I have tried a lot but not been able to understand the steps involved
I dont understand why I am not able to update a field on the
not able to get this, can someone help for this LINQ query? select col1,
$this->widget('zii.widgets.jui.CJuiAutoComplete', array( 'name'=>'test1', 'value'=>'test21', 'source'=>$this->createUrl('jui/autocompleteTest'), // additional javascript options for the autocomplete plugin 'options'=>array(
Not able to download artifacts from central maven repository. <mirrors> <!-- mirror | Specifies

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.