Hi all,
I am wondering if it is a "normal" request to have a JSP page return XML
output instead of HTML. I want to work with XSL to turn XML output from JSP
pages (so that the XML output can by dynamically created by using scriplet,
javabeans, etc) into HTML and sent back. Thus far I am trying to use the
latest XALAN with TrAX API. In my JSP page, I have something like:
<?xml version="1.0">
<%@ page contentType="text/xml" %>
<%
String s = "Hello";
%>
<html>
<head>
</head>
<body>
<h1><%= s %></h1>
</body>
</html>
For some reason I am getting various problems. Sometimes I get a Internal
500 Server error. Other times I get 'Failed to initialize chaining servlet
for contenttype text/xml (xsl)' on the returned page.
What I should see is something like:
<html>
<head>
</head>
<body>
<h1>Hello</h1>
</body>
</html>
Furthermore, I did this a while back but now I forgot how to do it..I would
like in my servlet to "grab" the JSP page output (as XML output) so that it
is in memory. I know it uses URL and/or URLConnection, but I am lost as to
how to actually grab the content of the URL. If anyone could assist me in
this I would be much appreciated.
Thank you.