• 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

VIEWSTATE hidden field size getting increased in UI - JSF

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I am using JSF 1.2, and i am having the STATE_SAVING_METHOD as 'client'.

So when i view the page, sometime in some JSP, the viewstate input hidden value is becoming so big and it is not getting closed properly.

Hence the hidden field is getting printed in UI.

Please suggest some workaround to decrease the size of viewstate hidden input field, or to split the single input hidden field to multiple hidden filed if the size exceeds more. (I know this issue going to address in JSF 2.2, but i want the workaround now to fix this issue.


Thanks,
David
 
David samueal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also changed the STATE_SAVING_METHOD as 'server', but still the problem is not resolved.
 
Saloon Keeper
Posts: 27807
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
I'm afraid that this doesn't make any sense to me. Could you provide some concrete examples?
 
David samueal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:I'm afraid that this doesn't make any sense to me. Could you provide some concrete examples?



Hi Tim,

The view state is stored in a hidden input field with the name javax.faces.ViewState, so in every page of my application i can able to see this hidden filed got generated automatically by JSF by viewing the source of HTML.

So in my situation, only few scenerios this view state filed value e.g : <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKLTk2Njk3OTQxNg9kFgICAw9kFgICCQ88KwANAGQYAQUJR3Jp
ZFZpZXcxD2dk4sjERFfnDXV/hMFGAL10HQUnZbk=" />

In some scenerio's the value is getting increased and it is overflows in the page. So this hidden filed getting printing in the JSP.

So i need some workaround to limit the size of this field's value or split this single hidden filed to multiple filed if the value becomes so large.

Thanks
 
Tim Holloway
Saloon Keeper
Posts: 27807
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
I've been working with JSF since 2006 and I've never, ever seen this problem in any version of JSF.

The only thing that I can figure out is that you're doing something architecturally weird, since you use the phrase "view the page, sometime in some JSP", and I don't have a clue as to what that is supposed to mean.
 
reply
    Bookmark Topic Watch Topic
  • New Topic