<%@ page import="javax.xml.transform.*, javax.xml.transform.stream.*, java.io.*" %>
<%
try
{
TransformerFactory transformerfactory = TransformerFactory.newInstance();
Transformer transformer = transformerfactory.newTransformer(new StreamSource(new File
(application.getRealPath("/") + "your.xsl")));
transformer.transform(new StreamSource(new File(application.getRealPath("/") + "your.xml")),
new StreamResult(new File(application.getRealPath("/") + "your.html")));
}
catch(Exception e) {}
FileReader filereader = new FileReader(application.getRealPath("/") + "your.html");
BufferedReader bufferedreader = new BufferedReader(filereader);
String instring;
while((instring = bufferedreader.readLine()) != null) {
%>
<%= instring %>
<%
}
filereader.close();
%>
|