The Web is certainly a more interesting place when we can interact with it, and that means telling a Web site just what we want. Normally, this is done through forms, which we'll cover in Chapter 5, but we're going to get a small taste of it now.
We want to be able to have our servlet display a single product page requested by the user, so we have to have a way to know which product page the user wants. One way to do that is to embed information directly into the URL.
Before we go back to TransformProd, let's take a look at extracting that information using HelloWorldServlet. Add the information shown in Listing 4.31 and recompile.
0:import java.io.*; 1:import javax.servlet.*; ...