38 lines
1.4 KiB
HTML
38 lines
1.4 KiB
HTML
<!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>Write a servlet</title>
|
|
</head>
|
|
|
|
<BODY>
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
<h5><A NAME="servwrt"></A>Write a servlet</h5>
|
|
|
|
This section shows you step-by-step how to write a sample servlet called <a href="sampserv.htm">ServletSample</a>. Each step is included with reference information about servlet methods and syntax and a description of how each piece of code works.
|
|
|
|
<p>To write the ServletSample servlet, perform these steps:</p>
|
|
|
|
<ol>
|
|
<li><p>Open your programming editor to edit a new file to be called ServletSample.java. For more information, see the WebSphere Development Studio Client Help.</p></li>
|
|
|
|
|
|
<li><p><a href="servimpt.htm">Enter the servlet <tt>import</tt> statements</a>.</p></li>
|
|
|
|
<li><p><a href="servclss.htm">Extend the HTTPServlet class</a>.</p></li>
|
|
|
|
<li><p><a href="servmeth.htm">Write the required servlet methods</a>.</p></li>
|
|
|
|
<li><p><a href="servreq.htm">Get the HTTP request information, if any</a>.</p></li>
|
|
|
|
<li><p><a href="servres.htm">Create the HTTP response</a>.</p></li>
|
|
</ol>
|
|
|
|
|
|
</body>
|
|
</html>
|