19.09.2015 Views

Prentice.Hall.Introduction.to.Java.Programming,.Brief.Version.9th.(2014).[sharethefiles.com]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 42.3<br />

(a) Choose Web Application <strong>to</strong> create a Web project. (b) Specify<br />

project name and location.<br />

Figure 42.4<br />

Choose servers and settings.<br />

Figure 42.5<br />

A new Web project is created.<br />

Now you can create a servlet in the project, as follows:<br />

<br />

1. Right-click the liangweb node in the project pane <strong>to</strong> display a<br />

context menu. Choose New › Servlet <strong>to</strong> display the New Servlet<br />

dialog box, as shown in Figure 42.6.<br />

2. Enter FirstServlet in the Class Name field and chapter42 in the<br />

Package field and click Next <strong>to</strong> display the Configure Servlet<br />

Deployment dialog box, as shown in Figure 42.7.<br />

7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!