Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
11.1 The import Attribute
249
in Table 11.1. All three of these servers also make use of JAR files in the
lib
subdirectory, and in all three cases you must restart the server whenever you
change files in this directory.
Table 11.1 Class Installation Directories
Automatically Availab
Location Relative
Reloaded
le from
to Installation
When Class
JSP
Server
Directory
Use
Changes?
Pages?
Tomcat 3.0
webpages/WEB INF/
Standard location No
Yes
classes
for servlet classes
Tomcat 3.0
classes
Alternative loca
No
Yes
tion for servlet
classes
JSWDK
webpages/WEB INF/
Standard location No
Yes
1.0.1
servlets
for servlet classes
JSWDK
classes
Alternative loca
No
Yes
1.0.1
tion for servlet
classes
Java Web
servlets
Location for fre
Yes
No
Server 2.0
quently chang
ing servlet classes
Java Web
classes
Location for
No
Yes
Server 2.0
infrequently
changing servlet
classes
Example
Listing 11.1 presents a page that uses three classes not in the standard JSP
import list:
java.util.Date
,
coreservlets.ServletUtilities
(see List
ing 8.3), and
coreservlets.LongLivedCookie
(see Listing 8.4). To simplify
references to these classes, the JSP page uses
<%@ page import="java.util.*,coreservlets.*" %>
Figures 11 1 and 11 2 show some typical results.
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved