Java Servlets 2.4

View: [ 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 ]

Articles
  

Articles:
  • Improved Internationalization in the Java Servlet 2.4 API by Robert Eckstein   - [Clicks: 72]
    In version 2.4 of the Java Servlet API, there are two new methods in the javax.servlet.ServletResponse interface that help to more directly support internationalization: * setCharacterEncoding(String encoding). This method sets the response's character encoding. The method provides an alternative to passing a charset parameter to setContentType(), or passing a Locale to setLocale(); * getContentType(): This method returns the response's content type. The method returns a String that can include a charset parameter set by either setContentType(), setLocale(), or setCharacterEncoding(). If no type was specified, the method returns null.
    [Includes sample code]
    http://java.sun.com/developer/EJTechTips/2005/tt0425.html#2 - Apr, 2005

[Top]