Use Java to generate an XML tree for a database that can be saved (10)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.