2. XMLServlet. java
Package com. sitechasia;
Import javax. servlet .*;
Import javax. servlet. http .*;
Import java. io. PrintWriter;
Import java. io. IOException;
Import javax. SQL. RowSet;
Import com. sitechasia. ejb .*;
Import javax. ejb. Handle;
Public class XMLServlet extends HttpServlet {
PrintWriter out;
Private static ResultEdit re;
Private Object ref;
Boolean flag = true;
Private Handle handle = null;
Private static String HostIP = null;
Private static String HostPort = null;
Private static final String CONTENT_TYPEX = "text/xml ";
Private static final String CONTENT_TYPEH = "text/html ";
Private static final String CONTENT_XSLT = "<? Xml-stylesheet type = "text/xsl" href = "/xsl/treefunc. xsl"?> ";
Private static final String content_1_c = "<? Xml-stylesheet type = "text/xsl" href = "xmltreexsl. xsl"?> ";
/** Initialize global variables */
Public void init () throws ServletException {
}
/** Process the HTTP Get request */
Public void service (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
Try {
HttpSession session = request. getSession ();