ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzamy_5.4.0.1/50/program/servimpt.htm

29 lines
1.4 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Enter the servlet <tt>import</tt> statements</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h6><A NAME="servimpt"></A>Enter the servlet <tt>import</tt> statements</h6>
<p>Type these import statements:</p>
<pre>import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
</pre>
<p>Import statements provide a way to shorten Java<sup>(TM)</sup> class names. For example, the example servlet code used elsewhere in this section uses the java.io.PrintWriter class. When you import the java.io package, you can use the short name of the class, PrintWriter, in your code.</p>
<p>The java.io and java.util package are standard packages in the core Java platform. However, the two other packages, javax.servlet and javax.servlet.http, are specific to the Servlet API and the Java 2 Enterprise Edition platform. The javax.servlet package provides the general classes and interfaces for servlets. The javax.servlet.http package provides HTTP-specific classes and interfaces for servlets.</p>
</body>
</html>