Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Is there a preferred encoding for struts?

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm quite confused about encoding, and I wonder if there is a preferred encoding for Struts (1.3.10 is what I use):

The servlet spec says iso=8859-1, and I notice that many libraries to be used with Struts use utf-8.

I also notice that I'm getting some problems with jsessionId being appended to servlet urls and breakign them (cookies are enabled). I think this may be due to the encoding used. I realize that the first time, if no cookie is set, the jsessionId should be used. However, this continues to be used even with cookies turned on.

All my links are served by servlets. If I code a link as follows:



the page source is served up differently depending on the encoding:
Under content="text/html;charset=utf-8":

when set to content="text/html;charset=iso-8859-1"


Sticking to the standard seems to make sense, but is there some advantage to utf-8??? I realize that I can accept both, but if one affects my urls, is there any advantage of doing this?

Maybe there is something else I'm missing??

_R
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic