verb-jv.mkii / last modification: 2020-01-30 14:15
%D \module
%D   [       file=verb-jv,
%D        version=2002.02.27,
%D          title=\CONTEXT\ Verbatim Macros,
%D       subtitle=Pretty \JAVA\ Verbatim,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Verbatim Macros / Pretty Java Verbatim}

%D This module differs from the \JAVASCRIPT\ driver in its
%D handling of comments. We also need a few more handlers: one
%D for \type {//} and \type {/*} and one for \type {*/} as
%D well as the \JAVA doc trigger \type {/**}.

%D We build this driver on top of the \PERL\ one. Since this
%D driver looks much like the \JAVASCRIPT\ one, we don't
%D comment it extensively.

\ifdefined\setupprettyPLtype \else \loadmarkfile{verb-pl} \fi



   \setpretty`\*=44 }

   \installprettyhandler 43 \JVtypefourthree
   \installprettyhandler 44 \JVtypefourfour
   \installprettyhandler 45 \JVtypefourfive }

      \ifcase\JVcommentlevel \inPLcommentfalse \fi

   \global\JVcommentlevel=0 }



     \global\advance\JVcommentlevel 1






     \global\advance\JVcommentlevel -1
     \ifcase\JVcommentlevel \global\inPLcommentfalse \fi

     \global\advance\JVcommentlevel -1
     \ifcase\JVcommentlevel \global\inPLcommentfalse \fi

\gdef\JVtypefourfive % permit - in javadoc @tags

\useprettyidentifiers \JVidentifiers \JVsetspecials
  abstract assert boolean break byte case catch char class const
  continue default do double else extends false final
  finally float for goto if implements import instanceof
  int interface long native new null package private protected
  public return short static strictfp super switch synchronized
  this throw throws transient true try void volatile while

\useprettyidentifiers \JVvariables \JVsetspecials
  @author @docRoot @deprecated @exception @inheritDoc @link
  @linkplain @param @return @see @serial @serialData @serialField
  @since @throws @value @version

%D The \JAVA doc feature was requested by Robert F.~Beeger,
%D who also provided this test class:
%D \startJV
%D package de.jwamalpha.handling.web.rbdipl;
%D import;
%D import;
%D import javax.servlet.http.HttpServlet;
%D import javax.servlet.http.HttpServletRequest;
%D import javax.servlet.http.HttpServletResponse;
%D import javax.servlet.ServletException;
%D /**
%D  * The simple login servlet
%D  *
%D  * @author Robert F. Beeger
%D  * @version 1.0
%D  */
%D public class LoginServlet extends HttpServlet
%D {
%D   //
%D   // public interface
%D   //
%D   /**
%D    * Process the get-request.
%D    *
%D    * @param request the request
%D    * @param response the response.
%D    */
%D   protected void doGet (HttpServletRequest request, HttpServletResponse response)
%D      throws ServletException, IOException
%D   {
%D     response.setContentType("text/html");
%D     PrintWriter writer = response.getWriter();
%D     writer.println("<html>");
%D     writer.println("  <head>");
%D     writer.println("    <title>Login</title>");
%D     writer.println("  </head>");
%D     writer.println("  <body>");
%D     writer.println("    Hallo, Benutzer " + request.getParameter("username") + "!");
%D     writer.println("  </body>");
%D     writer.println("</html>");
%D     writer.flush();
%D   }
%D }
%D \stopJV

\protect \endinput