The import Attribute
Format
<%@ page import="package.class" %>
<%@ page import="package.class1,...,package.classN" %>
Purpose
Generate import statements at top of servlet
Notes
Although JSP pages can be almost anywhere on server, 
classes used by JSP pages must be in normal servlet dirs
For Tomcat, this is
install_dir/webapps/ROOT/WEB INF/classes or
 /ROOT/WEB INF/classes/directoryMatchingPackage
For JRun, this is
install_dir/servers/default/default app/WEB INF/classes 
or  /WEB INF/classes/directoryMatchingPackage
37
JSP
www.corewebprogramming.com
Example of import Attribute
...

The import Attribute

<%   JSP page directive   %>
<%@ page import="java.util.*,cwp.*" %>
<%   JSP Declaration   %>
<%!
private String randomID() {
int num = (int)(Math.random()*10000000.0);
return("id" + num);
}
private final String NO_VALUE = "No Value";
%>
38
JSP
www.corewebprogramming.com
19




  

Home

About Services Network Support FAQ Order Contact
 

Java Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved