Java Reference
In-Depth Information
FIGURE 12-14
The following steps create a new Java servlet in TextPad.
To Create a New Java Servlet in TextPad
1. Click the New Document button on the Standard toolbar. If necessary,
click Line Numbers on the View menu to display line numbers.
2. Click File on the menu bar and then click Save As on the File menu.
When the Save As dialog box is displayed, click the Save in box arrow
and then click 3 1 2 Floppy (A:) in the Save in list.
3. Double-click the Chapter12 folder or the location specified by your
instructor.
4. Type WebStocks in the File name text box and then click Java (*.java) in
the Save as type list. Click the Save button in the Save As dialog box.
5. Enter lines 1 through 19 as shown in Figure 12-14. In the comments,
insert your own name as programmer and enter the current date.
TextPad displays the code for the initial comments, import statements, and
class header for the WebStocks class (Figure 12-15).
initial comments
file saved as
WebStocks.java
import statements
required for servlet
extends
HttpServlet
FIGURE 12-15
 
Search WWH ::




Custom Search