<%--List8_8_2.jsp--%>
<%@ page import="java.io.File,
                 javax.xml.transform.TransformerFactory,
                 javax.xml.transform.stream.StreamResult,
                 java.io.FileInputStream,
                 javax.xml.transform.stream.StreamSource,
                 javax.xml.transform.Transformer
                 "%>
<%@ page contentType="text/html;charset=GB2312" language="java" %>
 <%
     ServletContext context = pageContext.getServletContext();
      java.io.InputStream is=context.getResourceAsStream("/student.xsl");
     StreamSource xslSource = new StreamSource(is);
     is=context.getResourceAsStream("/student.xml");
     StreamSource xmlSource = new StreamSource(is);
     StreamResult xmlResult = new StreamResult(pageContext.getOut());
     TransformerFactory tf = TransformerFactory.newInstance();
     Transformer transformer = tf.newTransformer(xslSource);
     transformer.transform(xmlSource, xmlResult);
 %>


