IDependOn-Set: 1
IDependOn-Set: 189
IDependOn-Set: 194
IDependOn-Set: 195
IDependOn-Set: 196
IDependOn-Set: 2
LastModifiedSecs: 928904794
Parent: 189
SequenceNumber: 2
Title: What methods/packages exist to enhance the presentation of my servlet site? 
Part: 0
Author-Set: jon@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 928904794
Type: html
Lines: 32
Simple servlets will contain something like: <blockquote>
          <pre>  PrintWriter out = req.getWriter();
  out.println(&quot;&lt;HTML&gt;&quot;);
  ...
  out.println(&quot;&lt;/HTML&gt;&quot;);</pre>
        </blockquote>
        <p>For larger servlets, where presentation is important, this is not ideal for many
        reasons. For example, if a web designer was tasked with designing the look and feel of the
        site, they may not be comfortable editing and compiling Java servlet programs. There are
        two mainstream solutions to this problem: </p>
        <p>Page Compilation is when servlets are compiled and run on-the-fly by the web server
        from Java code embedded in the web page. JSP is described at <a
        HREF="http://java.sun.com/products/jsp/index.html">http://java.sun.com/products/jsp/index.html</a>.
        GnuJSP is a free implementation of the JSP standard. You might want to check it out at <a
        HREF="http://www.nmg.nl/~vinny/gnujsp/">http://www.nmg.nl/~vinny/gnujsp/</a>. Another
        implementation called GSP, can be found at <a
        HREF="http://www.bitmechanic.com/projects/gsp/">http://www.bitmechanic.com/projects/gsp/</a>.
        </p>
        <p>Template System, is when you base your page layout in an HTML template. A few Java
        Apache members have created a template package, which has not yet been packaged and
        released. It can be checked out using anonymous CVS from the same repository as Apache
        JServ as the module 'jserv_utils'. See the CVS instructions on the <a
        href="http://java.apache.org/">Java Apache Project</a> web site for more information on
        this.</p>
        <p>Recently, a totally new approach based on XML/XSL was made available by the <a
        href="http://java.apache.org/cocoon/index.html">Cocoon Project</a>. This project aims to
        separate page content, style and logic on different files allowing parallel development as
        well as reuse for medium to complex web sites. If managing your site has become a
        nightmare, you should check it out and see if it feets your needs.</p>


<p>There is also the Element Construction Set project which allows one to replace out.println() statements with actual Java objects. More information can be found at the <a href="http://java.apache.org/ecs/">ECS</a> website.
EndPart: 0
