Within an application that is marked as distributable, all requests that are part of a session 
can only be handled on a single Java Virtual Machine at any one time. In addition all objects 
placed into the session must implement the Serializable interface.  The servlet container may 
throw an IllegalArgumentException if a non serializable object is placed into the session 
(Section 7.7.2 in Servlet 2.2 spec).
2.7.3
Specifying Content Types
A JSP page can use the 
contentType
 attribute of the page directive to indicate the content 
type of the response it provides to requests. Since this value is part of a directive, a given 
page will always provide the same content type. If a page determines that the response 
should be of a different content type, it should do so  early , determine what other JSP page 
or Servlet will handle this request and it should forward the request to the other JSP page or 
Servlet.
A registry of content types names is kept by IANA. See:
ftp://venera.isi.edu/in notes/iana/assignments/media types/media types
2.7.4
Delivering Localized Content
The Java Platform support for localized content is based on a uniform representation of text 
internally as Unicode 2.0 (ISO010646) characters and the support for a number of character 
encodings to and from Unicode.
Any Java Virtual Machine (JVM) must support Unicode and Latin 1 encodings but most 
support many more. The character encodings supported by the JVM from Sun are described 
at:
http://java.sun.com/products/jdk/1.1/docs/guide/intl/encoding.doc.html
The JSP 1.1 specification assumes that JSP pages that will deliver content in a given 
character encoding will be written in that character encoding. In particular, the 
contentType
 attribute of the 
page
 directive describes both the character encoding of the 
JSP page and the character encoding of the resulting stream.
The valid names to describe the character encodings are those of IANA. They are described 
at:
ftp://venera.isi.edu/in notes/iana/assignments/character sets
The 
contentType
 attribute must only be used when the character encoding is organized 
such that ASCII characters stand for themselves, at least until the 
contentType
 attribute is 
found. The directive containing the 
contentType
 attribute should appear as early as 
possible in the JSP page.
49
JavaServer Pages 1.1 Specification  
November 30, 1999




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.