Red Hat NETSCAPE ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Bedienungsanleitung Seite 88

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 124
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 87
Legacy Configuration Files
88 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001
Here is a sample servlets.properties file:
# Servlets Properties
# servlets to be loaded at startup
servlets.startup= hello
# the default document root,
# needed so ServletContext.getRealPath will work
servlets.config.docRoot=d:/Netscape/Server4/docs
# tracker servlet
servlet.tracker.code=MyTrackerServlet
servlet.tracker.classpath=d:/Netscape/Server4/docs/servlet
# demo1 servlet
servlet.demo1.code=Demo1Servlet
servlet.demo1.classpath=d:/Netscape/Server4/docs/demos
servlet.demo1.initArgs=a1=0,b1=3456
servlet.demo1.context=context1
rules.properties
The rules.properties file defines servlet virtual path translations, for the default
virtual server only. For example, you could set up a mapping so that the URL
pointing to
/mytest2 invokes the servlet named demo1 in the
servlets.properties file. You can specify virtual paths for your servlets either
by setting parameters in the Legacy Servlets>Configure Servlet Virtual Path
Translation page of the Server Manager interface or by specifying the paths in the
rules.properties file.
Note that the
name associated with the servlet in servlets.properties is used in
the file
rules.properties -- the class name of the servlet does not show up in
rules.properties. For example, the following lines in servlets.properties
associate the servlet name
demo1 with the servlet class file Demo1Servlet.class in
the directory
d:/Netscape/Server4/docs/demos.
The following line in
rules.properties defines a servlet virtual path translation
such that the URL
http://server_id/mytest2 invokes the servlet at
d:/Netscape/Server4/docs/demos/Demo1Servlet.class.
/mytest2=demo1
# in servlets.properties
# demo1 servlet
servlet.demo1.code=Demo1Servlet
servlet.demo1.classpath=d:/Netscape/Server4/docs/demos
Seitenansicht 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 123 124

Kommentare zu diesen Handbüchern

Keine Kommentare