• No results found

iNET Java/JSP/Servlet Course

N/A
N/A
Protected

Academic year: 2022

Share "iNET Java/JSP/Servlet Course"

Copied!
11
0
0

Loading.... (view fulltext now)

Full text

(1)

In this session, you will learn to:

Deploying Web applications

Objectives

iNET Java/JSP/Servlet Course

(2)

Deploying Web Applications

A web application is defined as a hierarchy of directories and files in a standard layout.

You can access this hierarchy in an unpackaged form or packaged form.

In the unpackaged form, each directory and file in the hierarchy exists in the web application directory structure separately.

In the packaged form, the hierarchy is available as a Web Archive, or WAR file.

The unpackaged structure is useful during the development of the web application, while the packaged structure is used when you distribute your application.

iNET Java/JSP/Servlet Course

(3)

Each Web application is given a unique context root, which is the name of the Web application as seen by the browser.

The top-level directory of the web application hierarchy is also known as the context root of the application.

Context root directory is immediately followed by the WEB- INF directory.

The classes, lib and tags directories are placed immediately inside the WEB-INF directory.

To facilitate creation of a WAR file in the required format, you are required to arrange the directory and files of your Web application in the appropriate format.

Structure of the Web Application

iNET Java/JSP/Servlet Course

(4)

The directory and files contained in the context root of the Web application are:

*.html, *.jsp, image files, and style sheets /WEB-INF/web.xml

/WEB-INF/classes/

/WEB-INF/lib/

Structure of the Web Application (Contd.)

iNET Java/JSP/Servlet Course

(5)

A WAR file is a JAR file containing the Web application structure in a portable and compressed form.

When you build a new project, a dist folder is created in the project folder that you have created in NetBeans IDE 5.5.1.

The .war file is created in the dist folder that you can use for deploying on the Application server.

WAR File

iNET Java/JSP/Servlet Course

(6)

Challenge

Which of the following directories contains any Java class files required for your application?

a. classes b. lib

c. Tags d. TLD

Answer:

b. classes

iNET Java/JSP/Servlet Course

(7)

Challenge (Contd.)

Which of the following directories is NOT placed directly inside the WEB-INF directory?

a. classes b. lib

c. tags d. jar

Answer:

d. jar

iNET Java/JSP/Servlet Course

(8)

Challenge (Contd.)

Which of the following is a JAR file containing the Web application structure in a portable, and compressed form?

a. TLD b. WAR c. web.xml d. JSP

Answer:

a. WAR

iNET Java/JSP/Servlet Course

(9)

Challenge (Contd.)

Which of the following directories immediately follows the context root directory of the application?

a. classes b. lib

c. WEB-INF d. tags

Answer:

c. WEB-INF

iNET Java/JSP/Servlet Course

(10)

Challenge (Contd.)

Which of the following directories contain the web.xml file ?

a. classes b. WEB-INF c. lib

d. Tags

Answer:

b. WEB-INF

iNET Java/JSP/Servlet Course

(11)

In this session, you learned about:

Deploying Web Applications

Summary

iNET Java/JSP/Servlet Course

References

Related documents

Design a web application using the Struts MVC framework Develop a Struts action class.. Configure the Struts

The default session management mechanism uses HTTP cookies. Web containers must also support URL-rewriting for session management when the client has cookies

Request processing by the web container Applying filters to an incoming request Applying filters to a dispatched request Web Container Request Cycle.. iNET

Which of the following methods of the ServletRequestWrapper class is used to return an array of String objects containing all the values of the given request

Design the database tables that map to the domain objects Design the business services (the model) to separate the database code into classes using the data access object

Write JSP code using scripting elements Write JSP code using the page directive Write JSP code using standard tags.. Write JSP code using the Expression Language (EL) Configure the

A tag library consists of a collection of functionally related, user-defined XML tags called custom tags.. iNET

The pageContext object provides access to all attribute scopes: page, request, session, and application.. The pageContext object provides access to all implicit objects in the