Server-Side-Include Servlets

I've been tring to get SSI Servlets to work with no progress.  Can someone
help me out.

I've got two servlets - one that inherits from HttpServlet and one that
inherits from GenericServlet.  I've responded to doGet() and service().
Neither works.  They're installed int he standard www/servlets directory.

I've tried placing all sorts of code in the .shtml file:

<HTML>
<HEAD>
<TITLE>Try Server Side Include</TITLE>
</HEAD>
<BODY>
Trying Server Side Include SimpleHelloServlet:<BR><BR>

<!--#servlet name="SimpleHelloServlet"-->
<!--#servlet name="SimpleHelloServlet"
code="/servlets/SimpleHelloServlet"-->
<!--#servlet name="SimpleHelloServlet" code="servlets.SimpleHelloServlet"-->
<!--#servlet name="SimpleHelloServlet" code="SimpleHelloServlet"-->

Trying Servlet tag
<servlet name="SimpleHelloServlet"
code="/servlets/SimpleHelloServlet></servlet>
<servlet name="servlets.HelloWorldSSI"></servlet>
<servlet name="/servlets/HelloWorldSSI"></servlet>
<servlet name="servlets/HelloWorldSSI"></servlet>

</BODY>
</HTML>

Some of these do nothing, some of them give me an error and a half on an
HTML page.  Ergh...  SimpleHelloServlet simply needs to output a HTML
fragment.

For a SSI servlet that needs to output an HTML fragment, do I inherit from
HttpServlet or GenericServlet?

Do I impliement service(), doGet(), or otherwise?

What's the standard method for including SSI servlets, <Servlet> or
<!--#servlet ...-->?

Thanks,
Brian

Received on Friday, 19 February 1999 19:13:35 UTC