程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> JSP編程 >> 關於JSP >> 用Java實現可保存狀態的數據庫生成XML樹,源碼來了(10)

用Java實現可保存狀態的數據庫生成XML樹,源碼來了(10)

編輯:關於JSP

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();

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved