In this topic, we feature how to create a sample servlet (ServletSample), from start to finish. We explain the sample code and give you pointers on how to develop your own servlets.
While the details of the steps below are specific to the ServletSample servlet code, you can use the information in this section as an example of how to develop your own servlets.
To create the ServletSample servlet, perform these steps:
Step 1: Write the servlet
Follow along as we write the ServletSample servlet and give you tips for writing your own servlets.Step 2: Compile the servlet
Use Qshell to compile the sample servlet and your own servlets.Step 3: Package and deploy an application
Use the WebSphere Development Studio Client to package compiled code into a Web module before you install it on the server and to create a deployment descriptor (web.xml) file. For more information, see the WebSphere Development Studio Client.Step 4: Test the servlet
Run the ServletSample to make sure it works.