All the servlets you’ve seen so far generate full HTML pages. If this were all that servlets could do, it would still be plenty. Servlets, however, can also be embedded inside HTML pages with something called server-side include (SSI) functionality.
In many servers that support servlets, a page can be preprocessed by the server to include output from servlets at certain points inside the page. The tags used for a server-side include look similar to those used for applets:
initValue2> <PARAM NAME=
value1> <PARAM NAME=
value2> If you see this text, it means that the web server providing this page does not support the SERVLET tag. </SERVLET>
CODE attribute specifies the class name or
registered name of the servlet to invoke. The
attribute is optional. It can refer
to a remote location from which the servlet should be loaded. Without
CODEBASE attribute, the servlet is assumed to be
Any number of parameters may be passed to the servlet using the
PARAM tag. The servlet can retrieve the
parameter values using the
getParameter() method of
ServletRequest. Any number of initialization (init)
parameters may also be passed to the servlet appended to the end of
SERVLET tag. We’ll cover init
parameters in Chapter 3.
A server that supports SSI detects the
SERVLET tag in the process of returning the page and substitutes in ...