62
Chapter 6 Developing Web Applications
Developing web applications
This section describes how to create a web application, and then describes how to add
resources and components to the web application.
Creating a web application
JRun provides an empty web application on the default JRun server that you can use for
developing web applications. The web application root directory is
jrun_root/servers/default/default-ear/default-war. JRun creates the basic directory
structure of the application, a web.xml file with the minimal information in it, and an
application URL mapping. You can begin developing servlets, JSPs, and EJBs and place
them in the default-war directory structure.
In addition, when you create a JRun server using the JMC, JRun creates a default web
application on that server. You use the same rules to add content to the default
application as you do to any web application. For more information on adding resources
to a web application, see
“Adding web application components” on page 62.
Adding web application components
A complete web application can be composed of servlets, JSPs, HTML pages, Flash
(.swf ) files, images, tag libraries, JavaBeans, Enterprise JavaBeans, and other application
resources. As part of developing a web application, you add these components to the
directory structure of the application.
The following sections describe how to add components to a web application:
•
“Adding directories,” on page 62
•
“Adding HTML pages,” on page 63
•
“Adding JSPs,” on page 63
•
“Adding Java Servlets,” on page 63
•
“Using the ServletInvoker,” on page 64
•
“Adding tag libraries,” on page 64
•
“Adding EJBs,” on page 64
•
“Adding additional resources,” on page 65
Adding directories
The directory structure of a web application defines at least one subdirectory named
WEB-INF. For a description of this directory, see
“About the web application directory
structure” on page 58
.
However, many web applications contain directories in addition to WEB-INF under the
application root directory. As long as the additional directories do not contain .class or
JAR files that must be included in the application classpath, adding a subdirectory to the
application root requires no special action other than creating the directory.
For example, you commonly place image files in a directory named images under the
application root directory. Another common directory is an include directory for any files
shared by more than one application resource.
Содержание 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...