Red Hat NETSCAPE ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Manuale Utente Pagina 84

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 124
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 83
Configuring Servlets in the Default Virtual Server
84 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001
Note that you can specify multiple values as the servlet classpath if needed.
Specifying Servlet Virtual Paths
If you register a servlet individually instead of putting it in a servlet directory, you
must define a servlet virtual path for it. For example, you could specify that the
URL
http://poppy.my_domain.com/plans/plan1
invokes the servlet defined in the directory
server_root
/docs/plans/releaseA/planP2Version1A.class
You can set up servlet virtual paths for servlets that reside anywhere in the file
system, in or out of a registered servlet directory.
To specify a servlet virtual path, use the Legacy Servlets>Configure Servlet Virtual
Path Translation page in the Server Manager interface. In this page, specify the
virtual path name and the servlet name. You can alternatively manually edit the
rules.properties configuration file to add a servlet virtual path. Only servlets
for which a virtual path has been set up can use initial arguments.
Before using a servlet virtual path, a servlet identifier (or servlet name) must be
added for the servlet in the Legacy Servlets>Configure Servlet Attributes page of
the interface (or in the
servlets.properties configuration file).
Virtual Servlet Path Example
This example shows how to specify that the logical URL
http://poppy.my_domain.com/plans/plan1
invokes the servlet defined in
server_root
/docs/plans/releaseA/planP2Version1A.class.
1.
Specify the servlet identifier, class file, and class path.
servlet.BuyNowServlet.classpath=D:/Netscape/server4/docs/servlet
/buy;D:/Netscape/server4/docs/myclasses
servlet.BuyNowServlet.code=BuyNow1A
servlet.BuyNowServlet.initArgs=arg1=45,arg2=online,arg3="quick
shopping
Vedere la pagina 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 123 124

Commenti su questo manuale

Nessun commento