<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>a.muse: J2EE 1.4 Content Type Tidbit</title>
    <link>http://www.jessirae.com/blog/articles/2008/02/20/j2ee-1-4-content-type-tidbit</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>J2EE 1.4 Content Type Tidbit</title>
      <description>&lt;p&gt;Using Wireshark, you can detect some subtle differences in the j2ee 1.3 and 1.4 api&amp;#8217;s as relating to http responses.  One is difference is that PrintWriter appends the charset to the end of the content type (e.g. the &lt;span class="caps"&gt;MIME&lt;/span&gt; type) with a default of iso-8850-1.  Also, setting the locale using response.setLocale() &lt;em&gt;after&lt;/em&gt; setting the content type also appears to cause the charset to be appended to the content type.&lt;/p&gt;


	&lt;p&gt;Why is this an interesting find?  Well, these extra characters have the potential of breaking things if client side code hasn&amp;#8217;t been written well.  For instance, a browser plugin that decides what to do with the response based on the &lt;span class="caps"&gt;MIME&lt;/span&gt; type may not know how to deal with a &lt;span class="caps"&gt;MIME&lt;/span&gt; type where &amp;#8221;;charset: iso-8850-1&amp;#8221; is appended to the end.  If these changes to the api are breaking someone else&amp;#8217;s code :-(, you can work around these differences by writing the needed string in a jsp.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;See future self, how would you ever have remembered that one if you hadn&amp;#8217;t have written it down?&lt;/em&gt;&lt;/p&gt;
</description>
      <pubDate>Wed, 20 Feb 2008 00:25:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:fceceb4e-c804-4cb8-955e-7094a8061007</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2008/02/20/j2ee-1-4-content-type-tidbit</link>
      <category>technology</category>
      <category>type</category>
      <category>content</category>
      <category>mime</category>
      <category>j2ee</category>
      <category>java</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/12737</trackback:ping>
    </item>
  </channel>
</rss>
