This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Is there a preferred encoding for struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Is there a preferred encoding for struts?" Watch "Is there a preferred encoding for struts?" New topic
Author

Is there a preferred encoding for struts?

Rex Norm
Ranch Hand

Joined: Dec 11, 2010
Posts: 41
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Is there a preferred encoding for struts?
 
Similar Threads
javax.servlet.jsp.JspException: Cannot find bean: "testList" in any scope
Effect of Calling setContextType() more than once
Mail attachment charset problem
advice regarding URL for a servlet
redirecting servlet fails with embedded jsessionId