扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
import javax.xml.transform.TransformerFactory; z=[ti/ import javax.xml.transform.*; { 'WD import javax.xml.transform.stream.StreamSource; I4l:/.ICK import javax.xml.transform.stream.StreamResult; Hjas2ZO{ import javax.xml.transform.TransformerException; _Q_F6'c import javax.xml.transform.TransformerConfigurationException; 1,g$BtP70 97pl1-1I import java.io.FileOutputStream; nn74]-| import java.io.FileNotFoundException; I@vG #G import java.io.IOException; 6xZ+#y+= import java.io.*; &f+x&< w= lA$1W5P import javax.servlet.*; X/Gc73 import javax.servlet.http.*; #0'0NT- import javax.servlet.http.HttpServlet; ,-R p_YB pAdj /** & s\N4 * Title: Test );@NfVJ * Description: Case Study <#B}.#`rNl * Copyright: Copyright (c) 2001 eI}&Y? * Company: [Zbm&3% * @author tony chen !8Ht1fi8 * @version 1.0 X%4naf2hv */ ./ ^# R(| ]+Z< public class test extends HttpServlet { zNmjv private static final String CONTENT_TYPE = "text/html"; a# U4{DYEU /**Initialize global variables*/ S`o^1YS* public void init(ServletConfig config) throws ServletException { ^MdpuI8Q' super.init(config); j#'\Gp } 6 z&lj% /**Process the HTTP Get request*/ 6a[4 ?g,dW public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { So>3N5 try{ @S[$;D aN :irXS74 TransformerFactory tFactory = TransformerFactory.newInstance(); lq`:}2^x B;| Sm .n]\|S Transformer transformer = JTtRdhcB tFactory.newTransformer(new StreamSource(new File("C:/resin/jworkflow/xsl/xxx.xsl"))); <p?<\lU)M transformer.setOutputProperty("encoding","gb2312"); pY8a`tBa transformer.transform( Vm&#oy]0 new StreamSource(new File("C:/resin/jworkflow/WEB-INF/classes/xml/yyy.xml")), [H=VF<dp new StreamResult(response.getOutputStream())); _kJ+Q[$-M^ } HNtb*(^Nbc catch(Exception e){e.printStackTrace();} Mhe\IhFT } %,LVL! /**Clean up resources*/ 4'-vO%V public void destroy() { #o-AZ } iNaUJj } A:y`Tix0d |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者