Red Hat NETSCAPE ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Manual do Utilizador Página 93

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 124
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 92
Legacy Examples
Chapter 8 Legacy Servlet and JSP Configuration 93
If a servlet uses the ServletRequest.getParameter method to retrieve values in
form fields having non-UTF-8 characters, the
parameterEncoding property must
be set to
auto (the default) or responseCT in the contexts.properties file.
Otherwise, the values extracted by the
getParameter method are zeros or are
undefined. For more information see “ServletRequest.getParameter,” on page 74.
The
parameterEncoding property setting applies to how a servlet processes
parameters after the iPlanet Web Server receives a request. The URI that is sent to
the server must consist of only the standard ASCII set, especially if the request
method is GET. All other characters must be encoded.
For example, to encode a backslash, you would replace the backslash with a
%
followed by the hexadecimal number corresponding to the backslash in the ASCII
character set,
5c. Therefore, vw\xyz becomes vw%5cxyz. For more information
about characters that must be encoded, see “parameter-encoding,” on page 22.
singleClassLoader
By default, the singleClassLoader property is false, which means that each
servlet is loaded in a different class loader, even if the servlets share a context. This
makes it difficult for two servlets to access each other’s static class members. To
load all servlets within a context in the same class loader, set the
singleClassLoader property to true.
Servlet reloading (which occurs when
.class or .jsp files are changed) does not
work when
singleClassLoader=true.
If
singleClassLoader=true, RequestDispatcher.forward calls to JSPs do not
work unless you add the
ClassCache directory to the context.global.classpath
line in
contexts.properties. For example:
context.global.singleClassLoader=true
context.global.classpath=server_root/https-server_id/ClassCache
Legacy Examples
iPlanet Web Server 6.0 comes with a set of legacy example servlets and JSP files.
You can find them at the following location:
server_root
/plugins/servlets/examples/legacy
responseCT Tries to figure out the proper encoding from the response content type
if it is available. Otherwise, the system default encoding is used.
Vista de página 92
1 2 ... 88 89 90 91 92 93 94 95 96 97 98 ... 123 124

Comentários a estes Manuais

Sem comentários