Xml, xsl and jsp
I used this code to create an xml file through an xsl:
<%@page import="javax.xml.transform.*,javax.xml.transform.stream.*,java.io.File,java.util.Properties" %>
<%
File fXml = new File("C:\\file.xml");
File fXsl = new File("C:\\file.xsl");
File fRes = new File("C:\\res.xml");
StreamSource xml = new StreamSource(fXml);
StreamSource xsl = new StreamSource(fXsl);
StreamResult res = new StreamResult(fRes);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(xsl);
transformer.transform(xml,res);
%>
but in the res.xml file i have:
<table> instead of <table>
what can i do to solve this problem?
thanks
I'm near to solution
i use
StringWriter resultStringWriter = new StringWriter();
StreamResult res = new StreamResult(resultStringWriter);
and then
transformer.transform(xml,res);
String str = resultStringWriter.toString();
this is my xsl:
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes" encoding="ISO-8859-1"/>
<xsl:template match="XMLDATA">
<![CDATA[<tag1>]]><xsl:value-of select="CodiceAmministrazione"/><![CDATA[</tag1>]]>
</xsl:template>
</xsl:stylesheet>
but now the problem is the output:
\r\n<tag1>Test</tag1>\r\n
and not
<tag1>Test</tag1>
If I write the xsl on one line i have no problem
Can you help me please?
Similar Messages
-
XML, XSL - HTML(JSP), bad UTF-8 encoding on Tomcat
I use simple transformation to create HTML (JSP) page from XML, XSL (both are encoded in UTF-8}. When doing this in embedded web server in JD9i developer, the result is fine. But when run at Tomcat 4.0.3, UTF-8 chars are displayed as 2 characters. It's interesting that the transformation gives different results:
- in JD9i the UTF-8 chars are left unchanged and shown good in IE browser
- in Tomcat the chars with acute (/) are transformed into "í" , "á" and so on and shown properly, whereas chars with caron (V) are encoded and shown badly.
Does somebody know solution to this ? Thanks.Doing some more experiments reveals a subtle difference between GET and POST with Tomcat - it may apply to other application servers, but I have only tested with Tomcat 5 and Tomcat 6, so I can't say.
The following is essentially what most people have indicated you need to do to have your JSP handle UTF-8:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>My Title</title>
</head>
<body>
</body>
</html>This is what I couldn't get working with my GET (the default for forms) and ended up working when I specified the URIEncoding for the connector in the server.xml file.
It turns out that the above will work with no modifications to the server.xml file if the form method is POST. If you need to be able use GETs then you will need to modify the connector, otherwise it would seem nothing you do at the JSP or servlet level will make a difference, unless you want to convert each parameter manually:
String parameter = new String( request.getParameter("myParam").getBytes("ISO-8859-1"), "UTF-8" );Edited by: ajmasx on Sep 27, 2007 10:20 AM -
About XML/XSL and Javascript : Plz Help Urgent
Hai , I am developing one module which invloves XML database ,XSL and Javascript.
In this I want to transform XML data to XHTML form using XSLT .,
I have done this ,(using xsl templates ,In my form two radio buttons one dropdown box and two text boxes are there .).
All the information which ever is displayed coming from XML .,
But I want to validate this elements (which are in xslt ,ie checking text box is empty or not ..)
Where I have to add script in XSL .,
Plz give simple example on this ,
I am sending this code ,plz have a look at this ,,
XML -----+ ---XSLT---------------> XHTML(HTML) (where validation is required)*
Hotels.xml
==============>
<Services>
<Service>
<Hotels type="radio" title="Hotel" groupname="service" default="true"/>
<HotelsFlights type="radio" title="Flight+Hotel" groupname="service"/>
</Service>
<Hotels>
<Destination title_d="Destination :">
<DestinationPlace type="OPTION" id="" title_d="Select Destination" value_d="Select Destination" defalut="true"/>
<DestinationPlace type="OPTION" id="" title_d="Aruba" value_d="Aruba" />
</Destination>
<HotelChoice title_hc="Hotels :">
<choice type="OPTION" id=" " title_h="AmsterDam Manor Beach" value_h="AmsterDam Manor Beach"/>
<choice type="OPTION" id=" " title_h="Wyndham Aruba Beach" value_h="Wyndham Aruba Beach"/>
</HotelChoice>
<Dates>
<CheckIn type="INPUT" title_dt="Check In :" id="chkin" name="chkin" size_dt="10" maxlength="10">mm/dd/yyyy</CheckIn>
<CheckOut type="INPUT" title_dt="Check Out :" name="chkout" size_dt="10" maxlength="10">mm/dd/yyyy</CheckOut>
</Dates>
<RoomNos title="No.of Rooms :">
<room type="OPTION" id="" titl="1" valu="1"/>
<room type="OPTION" id="" titl="1" valu="2"/>
<room type="OPTION" id="" titl="1" valu="3"/>
</RoomNos>
<Submit tile="Search :" type="submit" id="search" value="Search"/>
</Hotels>
</Services>
Hotels.xsl-
------------->
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<script language="javascript">
function RadioFunc()
var result;
alert(" Radio ");
result +=document.write("<TABLE >");
result +=document.write("<TR><TD>"+'Praveen'+"</TD></TR>");
result +=document.write("</TABLE>");
alert("Result "+result);
function validateForm()
alert("Before validating");
var chkindate= document.getElementById(chkin).value;
alert(chkindate);
</script>
</head>
</html>
<xsl:apply-templates/>
<xsl:if test="@value_d='Select Destination'">
alert("Please Enter Destination");
</xsl:if>
</xsl:template>
<xsl:template match="Services" >
<form name="myform" action="two.jsp" method="get" >
<table bgcolor="lightgreen" width="350" height="200" border="1" >
<tr><td><xsl:apply-templates/></td></tr>
</table>
</form>
</xsl:template>
<xsl:template match="Service">
<table border="0" align="center" valign="top"><tr>
<xsl:for-each select="*">
<td align="left"><xsl:value-of select="@title"/></td>
<td align="center">
<input type="{@type}" onClick="RadioFunc()">
<xsl:attribute name="Name">
<xsl:value-of select="@groupname"/>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="@value"/>
</xsl:attribute>
<xsl:if test="@default='true'">
<xsl:attribute name="checked"/>
</xsl:if>
</input>
</td>
</xsl:for-each>
</tr></table>
</xsl:template>
<xsl:template match="Hotels/Destination">
<xsl:value-of select="@title_d"/>
<SELECT id="dest" name="dest">
<xsl:for-each select="*">
<xsl:element name="{@type}">
<xsl:value-of select="@value_d"/>
</xsl:element>
</xsl:for-each>
</SELECT>
</xsl:template>
<xsl:template match="Hotels/HotelChoice">
<xsl:value-of select="@title_hc"/>
<SELECT id="hcid" name="hcid">
<xsl:for-each select="*">
<xsl:element name="{@type}">
<xsl:value-of select="@value_h"/>
</xsl:element>
</xsl:for-each>
</SELECT>
</xsl:template>
<xsl:template match="Hotels/Dates">
<table><tr>
<xsl:for-each select="*">
<td>
<xsl:value-of select="@title_dt"/>
</td>
<td>
<xsl:element name="{@type}" >
<xsl:attribute name="size">
<xsl:value-of select="@size_dt"/>
</xsl:attribute>
<xsl:attribute name="maxlength">
<xsl:value-of select="@maxlength"/>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="text()"/>
</xsl:attribute>
</xsl:element>
</td>
</xsl:for-each>
</tr></table>
</xsl:template>
<xsl:template match="Hotels/RoomNos">
<table align="center"><th>Travellers</th>
<tr><td><xsl:value-of select="@title"/></td>
<td><SELECT id="rooms" name="rooms">
<xsl:for-each select="*">
<xsl:element name="{@type}">
<xsl:value-of select="@valu"/>
</xsl:element>
</xsl:for-each>
</SELECT>
</td></tr>
</table>
</xsl:template>
<xsl:template match="Hotels/Submit">
<table align="center" border="0" >
<tr>
<td align="center">
<input type="{@type}" onclick="validateForm();">
<xsl:attribute name="value">
<xsl:value-of select="@value"/>
</xsl:attribute>
</input>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
======================================================Hi
This is not the forum for this type of question ...sorry. Try the XMLDB forum, XML DB
Tim -
XML Messaging and JSP. Is it possible?
Here is my situation.
We are developing JSP with a backend interface to external/remote Java/C++ applications. We like to implment, if possible, XML messaging between JSP and remote programs.
First of all, is this possible? Can JAXM be used in JSP?
Thanks in advance.Sure, but you might need to use polling for the JSP to get the response to show the user.
-
XML, XSL, and why I need a URL to create a XSLStylesheet
In order to convert XML>>HTML I need to specify both the XML (data) and the XSL (stylesheet). Great.
Before I slap these two together, I need to create an instance of XSLStylesheet, which takes my raw XSL file and a **URL**?
XSLStylesheet xsl = new XSLStylesheet(xsldoc, xslURL)
What is this URL used for? Antoher XML processor I'm migrating from does not require this, and it looks like I can't avoid it. (There's no constructor for the XSLStylesheet that DOESN'T need the URL.)
QUESTIONS:
- Is there a way to avoid specifying a URL?
- If there's not a way, can someone tell me what the URL is being used for? All I see from the Javadoc is that it's a "Reference URL for include, import and external entities". Would love to be able to expand on that - leaves me in a fog.
Thanks!
Will.try using "null" as argument for url
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Will Garnett ([email protected]):
In order to convert XML>>HTML I need to specify both the XML (data) and the XSL (stylesheet). Great.
Before I slap these two together, I need to create an instance of XSLStylesheet, which takes my raw XSL file and a **URL**?
XSLStylesheet xsl = new XSLStylesheet(xsldoc, xslURL)
What is this URL used for? Antoher XML processor I'm migrating from does not require this, and it looks like I can't avoid it. (There's no constructor for the XSLStylesheet that DOESN'T need the URL.)
QUESTIONS:
- Is there a way to avoid specifying a URL?
- If there's not a way, can someone tell me what the URL is being used for? All I see from the Javadoc is that it's a "Reference URL for include, import and external entities". Would love to be able to expand on that - leaves me in a fog.
Thanks!
Will.<HR></BLOCKQUOTE>
null -
Hi,
can i save XSL value on String (JSP)?
for example:
<%
String strValue = <xsl:value-of select="."/>;
%>
give me a tip, please?
RegardsNo, because what you have there cannot be contained in a well-formed XML file.
-
I have several xml documents that uses different tags to describe the same type of information. In my case they describe a row in a database table.
file1.xml
<therow>
<name>Jones</name>
<title>manager</title>
</therow>
file2.xml
<arow>
<employee>King</employee>
<job>manager</job>
</arow>
I want to use a technology for reading the content of the two files and generate a new document for each file that will use generic tags so the content of the new files could look like:
file1
<row>
<employeename>Jones</employeename>
<employeetitle>manager</employeetitle>
</row>
file2
<row>
<employeename>King</employeename>
<emplyeetitle>manager</employeetitle>
</row>
An then I can read this information by using a generic Java class and insert it into the database table..
I was told that the technology used for doing this was XSLT. I have been searching the web for examples and also tried to read some of the content in the Steve Muench book 'Building Oracle XML Applications'.
I have managed to create XSL files, but I would really appreciate if someone could show me a real example of how to do this, with the xml file, the xsl file, and a small java program to read this. Can anyone help?follow up on http://forum.java.sun.com/thread.jspa?threadID=608775&tstart=0
-
Large Pdf using XML XSL - Out of Memory Error
Hi Friends.
I am trying to generate a PDF from XML, XSL and FO in java. It works fine if the PDF to be generated is small.
But if the PDF to be generated is big, then it throws "Out of Memory" error. Can some one please give me some pointers about the possible reasons for this errors. Thanks for your help.
RM
Code:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.apache.fop.apps.Driver;
import org.apache.fop.apps.Version;
import org.apache.fop.apps.XSLTInputHandler;
import org.apache.fop.messaging.MessageHandler;
import org.apache.avalon.framework.logger.ConsoleLogger;
import org.apache.avalon.framework.logger.Logger;
public class PdfServlet extends HttpServlet {
public static final String FO_REQUEST_PARAM = "fo";
public static final String XML_REQUEST_PARAM = "xml";
public static final String XSL_REQUEST_PARAM = "xsl";
Logger log = null;
Com_BUtil myBu = new Com_BUtil();
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException {
if(log == null) {
log = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);
MessageHandler.setScreenLogger(log);
try {
String foParam = request.getParameter(FO_REQUEST_PARAM);
String xmlParam = myBu.getConfigVal("filePath") +"/"+request.getParameter(XML_REQUEST_PARAM);
String xslParam = myBu.SERVERROOT + "/jsp/servlet/"+request.getParameter(XSL_REQUEST_PARAM)+".xsl";
if((xmlParam != null) && (xslParam != null)) {
XSLTInputHandler input = new XSLTInputHandler(new File(xmlParam), new File(xslParam));
renderXML(input, response);
} else {
PrintWriter out = response.getWriter();
out.println("<html><head><title>Error</title></head>\n"+
"<body><h1>PdfServlet Error</h1><h3>No 'fo' "+
"request param given.</body></html>");
} catch (ServletException ex) {
throw ex;
catch (Exception ex) {
throw new ServletException(ex);
public void renderXML(XSLTInputHandler input,
HttpServletResponse response) throws ServletException {
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
response.setContentType("application/pdf");
Driver driver = new Driver();
driver.setLogger(log);
driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(out);
driver.render(input.getParser(), input.getInputSource());
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
} catch (Exception ex) {
throw new ServletException(ex);
* creates a SAX parser, using the value of org.xml.sax.parser
* defaulting to org.apache.xerces.parsers.SAXParser
* @return the created SAX parser
static XMLReader createParser() throws ServletException {
String parserClassName = System.getProperty("org.xml.sax.parser");
if (parserClassName == null) {
parserClassName = "org.apache.xerces.parsers.SAXParser";
try {
return (XMLReader) Class.forName(
parserClassName).newInstance();
} catch (Exception e) {
throw new ServletException(e);Hi,
I did try that initially. After executing the command I get this message.
C:\>java -Xms128M -Xmx256M
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-cp -classpath <directories and zip/jar files separated by ;>
set search path for application classes and resources
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
Thanks for your help.
RM -
Hello.
I have a device that produce XML output file( dynamically )
I need to read it by Jsp page.
I able to do it using XSL but when XML changes my Jsp page is not updated.
Only if i recompile jsp page i get new data
Do you know some methods to get dynamically XLM data?
Thx
Riccardo
example code:
<%@page contentType="text/html"%>
<html><head><title>XSLT Example</title>
<%@ taglib uri='/WEB-INF/tlds/xslt.tld' prefix='xslt' %>
</head>
<body>
<xslt:apply xsl='Fieldgate.xsl'>
<%@ include file='output.xml' %>
</xslt:apply>
</body></html>Thats because you are including your XML in your JSP.
If you were to parse your XML in your in your JSP using SAX or DOM and then use them to populate the dynamic contents of your JSP then you will not need to recomplie your JSP.
Read the following article. It will help you out and possibly give you some other Ideas.
http://developer.java.sun.com/developer/technicalArticles/xml/WebAppDev2/#code13 -
JSP, XML, XSLT: applying XSL on JSP-generated XML doc
Hello,
I am currently trying to figure out how to do the following:
let's consider (that's not entirely hypothetical :) ) a web application working with JSP (on apache/tomcat 3.1) and oracle BC4J Application modules.
The JSPs call oracle webbeans to perform updates and retrieve data from an 8.1.6 database.
Now I'm thinking of moving to a combination of JSP, XML and XSL, which (hopefully) would allow to customize the application depending on the user's browser, language etc...(that's the point isn't it?)
It doesn't seem to be a problem to produce XML from a jsp, send it directly to the client browser, which in turn goes to look for the proper XSL file and does all the transformation stuff.
However this only works with I.E 5 for the moment right? and most website need to support various kinds of browsers...
The need is:
* When a non XML-capable browser is detected, apply the proper XSL(s) on the server side before sending the result back, in html/wml/whatever...
* For XML-capable browsers, produce raw XML, maybe apply some XSL(s), and eventually send the result to the browser which handles the rest of the XSL stuff itself.
Therefore, I'd like to:
- Have the jsp produce the raw xml data (maybe adding extra tags, to indicate the browser and/or the language that the jsp engine has detected).
- Pass the output to a first XSLT engine which would take care of the language stuff
- Feed the result into a second XSLT engine to handle browser specificities for instance...
- Send the final output to the client browser.
Now, there are 2 problems:
* 1/ I have seen various engines capable of chaining XSL transforms, and it is easy to produce XML from a jsp, but I don't know how to feed a jsp's output into an XML engine. is that possible? how?
* 2/ I'm a bit concerned about the cost of applying three (or more) process stages, does anyone have insight on the performance issues this could raise?
bonus question ;) : is there a simpler approach?
Thanks a lot in advance, Remi
nullHello,
I am currently trying to figure out how to do the following:
let's consider (that's not entirely hypothetical :) ) a web application working with JSP (on apache/tomcat 3.1) and oracle BC4J Application modules.
The JSPs call oracle webbeans to perform updates and retrieve data from an 8.1.6 database.
Now I'm thinking of moving to a combination of JSP, XML and XSL, which (hopefully) would allow to customize the application depending on the user's browser, language etc...(that's the point isn't it?)
It doesn't seem to be a problem to produce XML from a jsp, send it directly to the client browser, which in turn goes to look for the proper XSL file and does all the transformation stuff.
However this only works with I.E 5 for the moment right? and most website need to support various kinds of browsers...
The need is:
* When a non XML-capable browser is detected, apply the proper XSL(s) on the server side before sending the result back, in html/wml/whatever...
* For XML-capable browsers, produce raw XML, maybe apply some XSL(s), and eventually send the result to the browser which handles the rest of the XSL stuff itself.
Therefore, I'd like to:
- Have the jsp produce the raw xml data (maybe adding extra tags, to indicate the browser and/or the language that the jsp engine has detected).
- Pass the output to a first XSLT engine which would take care of the language stuff
- Feed the result into a second XSLT engine to handle browser specificities for instance...
- Send the final output to the client browser.
Now, there are 2 problems:
* 1/ I have seen various engines capable of chaining XSL transforms, and it is easy to produce XML from a jsp, but I don't know how to feed a jsp's output into an XML engine. is that possible? how?
* 2/ I'm a bit concerned about the cost of applying three (or more) process stages, does anyone have insight on the performance issues this could raise?
bonus question ;) : is there a simpler approach?
Thanks a lot in advance, Remi
null -
Using resourceDescription in SUBSCRIPTIONBUNDLED_Email.xsl and xml's.
Hello all,
We are trying to use the Primitive Template "resourceDescription" (as described in "Customizing Notifications"-pdf) in the SUBSCRIPTIONBUNDLED_EMAIL.xsl and SUBSCRIPTIONBUNDLED_en.xml.
Could anyone urgently let me know if it's possible to use this Primitive Template in the xsl and xml mentioned?
It looks like the "resourceDescription" is not being passed on to the bundlednotificationdata-section in the xml?
Any other suggestion in how to get the "resourceDescription" available in Daily Summary Subscription emails?
Thanks in advance,
Tim.Hello Alan,
Yes; as far as I know the only way to get your changes to any of the email notification xml files visible is by restarting the server
The notification email xsl I'm working on is the one for the daily notifications (subscriptionbundled_email.xsl).
My problem is that it seems that the resourceDescription is not being passed on by the java code that is populating the section in the xml file containg the resource information...
Unfortunately no confirmation about this yet (raised OSS with SAP as well).
I'm expecting this resourceDescription to contain the text that you can fill in using standard KM in the Description field of a resource.
I do wonder how/where your users populate the subject and description fields? Standard SAP KM or custom app?
Cheers,
Tim. -
Difference between facelets and jsp xml in Document Type
I want difference between facelets and jsp in Document Type in JDeveloper 11gR2 (11.1.2)
Thanks
Edited by: Amr Ahmed on Jun 8, 2011 7:46 AMLet's see.
Facelets creates a facelets page
JSP creates a JSP page
{noformat}:){noformat}
Facelets is the "official" view language for JSF 2.0
http://www.realdevelopers.com/blog/development/facelets-vs-jsp should give you some more insight as well.
John -
hi,
i just would like to include an xml file and his xsl file in a jsp page.
i know we can do it in asp like that :
<%
//load the xml file
var source = Server.CreateObjetc("Microsoft.XMLDOM");
source.load(Server.MapPath("toto.xml"));
//load the associated xsl file
var style = Server.CreateObject("Microsoft.XMLDOM");
style.load(Server.MapPath("toto.xsl"));
//transform the source document
var result = source.transformNode(style);
Response.Write(result);
%>
i want exactly do the same in jsp
does anyone know how to do?where is the big deal? there are many posts answering this in the forum.
here is a possibility:
<%@page contentType="text/html;charset=utf-8"%>
<%@page import="javax.xml.transform.*,javax.xml.transform.stream.*" %><%
Templates myTemplates = TransformerFactory.newInstance().newTemplates(new StreamSource(new File("whatever.xsl")));
Transformer transformer = myTemplates.newTransformer();
StringWriter sw = new StringWriter();
transformer.transform(new StreamSource(new File("whatever.xsl")), new StreamResult(sw));
out.print(sw.toString());
%> -
XML, XSL, XSLT, DOM?? What should be used?
I want to develop an application using JSP, Java, mySQL, and XML.
The application needs to be able to store data in the database but also define this data using XML. Some sort of style sheet for this data is also needed to assist in creating forms based on this data and style sheet on the fly for a new page that needs to be displayed based on the data that was entered before.
What XML technolgoies could best help in this situation? Can you see any problems associated with building these pages on the fly based on the XML and XML style sheet???
Any feedback or suggestions would be greatly appreciated?
Thank you and I look forward to hearing from anyone that could help!!!!Two things. One JRUN has a JSP tag that converts XML and an XSL to XHTML. Despite the preference of some (who must work with only XML enabled browsers) many people on the internet and even some corporate intranets do not have XML enabled browsers thus the XML/XSL solution does not present usable data to them.
The conversion to XHTML makes this data presented to ALL browsers.
A good reason for having the XML is that this has become the defacto standard for communication between businesses/applications on the web. Especially with any Web Service usage XML will almost certainly be required. In other words, minimize rework use a "standard" data that is usable my many different layers of presentation.
Hopefully I was clear enough. I am using XML as a pre-presentation data format and then using various forms (including JAXB) to present the data or manipulate the data depending on requirements. -
What is the best way to include an xml file in JSP?
I have a jsp page that I need to include an xml file. The xml file
uses an xsl to render the file. What is the best way to include the
xml file and still maintain the structure of the style sheet?
Thanks
Jennifer
The best way is using the tag lib. If you cannot, but you can use JAXP, you can
try
javax.xml.transform.Transformer.transform(Source xmlSource,
Result outputTarget)
throws TransformerException
You construct the transformer with you xsl, use you xml file or DOM to form xmlSource,
and use JSPWriter "out" to form outputTarget (StreamResult). But if your JSP page
generates the xml itself, tag lib is the only way.
[email protected] (Jennifer) wrote:
>[email protected] (Jennifer) wrote in message news:<[email protected]>...
>> I have a jsp page that I need to include an xml file. The xml file
>> uses an xsl to render the file. What is the best way to include the
>> xml file and still maintain the structure of the style sheet?
>>
>> Thanks
>>
>> Jennifer
>
>Or is there a way to parse the xml file with the jsp page to display
>the information. I cannot use the Java Standard Tag Libraries as the
>version of iplanet we are running does not support the JSTL
>
>Thanks
>
>Jennifer
Maybe you are looking for
-
Report based on the user profile
Hi, i'm trying to create a report with Oracle Report6i based on the user profile. I created a form with many Lovs, so that i can choose the parameter to send to the report (using a java script). I also would like to send the user that's currently log
-
Please help me in creating a Rational Class.
The class Rational contains rational numbers (that is, fractions) and has the usual arithmetic operations addition, subtraction, multiplication, division, reciprocal and negation. a) n/d + n�/d� = (nd� + n�d) / dd� b) � n/d = -n/d c) n/d
-
Are there any plans to include ColdFusion Builder in Adobe Creative Cloud?
Everything and the kitchen sink is in Creative Cloud. I hoped Flash Builder Premium included with Creative Cloud would come with it (like it does at retail), but it does not.
-
Why is my pdf converted into hieroglyphs in Word? Is it perhaps encrypted?
Is it perhaps encrypted?
-
Control the render true/false after rollback in ValueChangeListener
Hello I am using Jdeveloper 11.1.1.3.0 ADF BC. I have this problem: in my page I have some LOV that conrol the rendering true/false for other components, and we achieved this by a valuechangeLisntener method in a backing bean. and everything works we