Hi,
I am trying to dynamically creating an XML document
with the Java
Servlet and I am trying to style that XML information
to the
browser(IE5.5) using the static xsl document in the
same directory where
the servlet is there when I am trying to execute that
servlet it is
giving error like this
Access is denied. Error processing resource
'file://c:\servlets\test.xsl'.
I also tried with
that("c:\\test.xsl")and("file://test.xsl")but giving
same error
I am developing an xml application for that it is
necessary to display
the xml document on the fly with static xsl.
I am attaching my servlet and xsl file
Can u please co-operate me
regards...Bikash
It is my Servlet File:-
-------------------------
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class test extends HttpServlet
{
public void doGet
( HttpServletRequest req, HttpServletResponse res)
throwsServletException,
IOException
{
res.setContentType( "text/xml" );
ServletOutputStream out =
res.getOutputStream();
out.println("<?xml version=\"1.0\"?>" );
out.println("<?xml:stylesheet type=\"text/xsl\"
href=c:\\"test.xsl\"?>");
out.println("<persons>");
out.println("<firstname>Bikash</firstname>
out.println("<lastname>Paul</lastname>");
out.println("</persons>");
}
}
It is my xsl file:-
-----------------------
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:apply-templates select="//persons">
</xsl:apply-templates>
</xsl:template>
<xsl:template match="persons">
<xsl:value-of select="firstname"/>
<xsl:value-of select="lastname"/>
</xsl:template>
</xsl:stylesheet>
Thanks in Advance
Bikash
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html