当前位置:编程学习 > JSP >>

用Java实现可保存状态的数据库生成XML树,源码来了(10)

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();
补充:Jsp教程,Jsp/Servlet开发工具
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,