Web applications, JRun servers, and web servers
61
Each web application running in a JRun server can have one context root mapping and
multiple servlet mappings. You can define the
context root
in the jrun-web.xml file or let
JRun substitute one for you. JRun determines the context root in the following order:
1 Checks the /WEB-INF/jrun-web.xml file for a context root mapping.
2 If the WAR file is uncompressed, JRun uses the WAR file root directory name. For
example, if the WAR file is deployed in the
jrun_root/servers/samples/worldmusic-war/ directory, JRun uses worldmusic-war as
the context root.
3 If the WAR file is compressed, JRun uses the WAR filename, minus the “.war”
extension. For example, if the web application is contained in techniques.war, JRun
uses “techniques” as the context root.
To use web applications in an optimal manner, you must understand how JRun uses
application mappings and servlet mappings to handle requests for HTML files, JSPs, and
servlets. The following table describes the mappings that the JRun configuration files
define:
Application mappings
An application mapping relates a context path to the name and directory path of a web
application. The
context path
specifies the path prefix associated with a web application
mapping. For a default application (rooted at the base of the web server URL
namespace), the context path is an empty string. For a nondefault application, the
context path starts with a forward slash (/) but does not end with one. For example,
/compass maps request URLs that include /compass to the compass application.
For more information on understanding application mappings, see JRun Programmer’s
Guide.
Configuration file
Mappings
default-web.xml
Servlet, filter, and welcome file mappings.
Settings in the default-web.xml file apply to all web
applications on this JRun server.
web.xml
Servlet and filter mappings.
jrun-web.xml
Virtual path mappings and optional application
mapping (context-root) for stand-alone web
applications (WAR files).
application.xml
Application mapping (context-root) for the web
applications in an enterprise application (EAR file).
Содержание 38000382 - Macromedia JRun - Mac
Страница 1: ...Getting Started with JRun...
Страница 16: ......
Страница 68: ...54 Chapter 5 Introduction to EJB...
Страница 82: ......
Страница 110: ...96 Lesson 3 EJB Tutorial...
Страница 128: ...114 Lesson 4 Web Services Tutorial...
Страница 132: ...118 Index...