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_XSLC = "<?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();