In Window :
you have to use : file:\\\C:\\somethig\\testmyxsl.xsl
In Unix:
you have to use: file:///something//somedir//testmyxsl.xsl
or using url :
http:///something//somedir//testmyxsl.xsl
johnson tong
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Imran
Baig
Sent: Tuesday, May 08, 2001 9:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem using XSL while displaying XML through servlets
For XSL file don't give any path just use XSL filename. So instead of using
"
c:\\JavaWebServer2.0\\servlets\\test.xsl\" use "test.xsl".
Baig
Seema P Kumar <[EMAIL PROTECTED]> on 05/08/2001 03:20:44 PM
Please respond to "A mailing list for discussion about Sun Microsystem's
Java
Servlet API Technology." <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Imran Baig/CresSoft)
Subject: Problem using XSL while displaying XML through servlets
Hi all,
I am attempting to display an XML document that uses a XSL style sheet,
through a servlet. I have placed both the servlet class file and .xsl file
in the same /servlets directory of JavaWebserver. However, while trying to
display the servlet the browser throws the following error :
Access is denied.
Error processing resource 'file://c:\JavaWebServer2.0\servlets\try.xsl'.
I use the following code snippet for the same :
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException{
response.setContentType("text/xml");
PrintWriter out = response.getWriter();
out.println("<?xml version=\"1.0\" standalone=\"yes\" ?>");
out.println("<?xml-stylesheet type=\"text/xsl\"
href=\"c:\\JavaWebServer2.0\\servlets\\test.xsl\"?>");
out.println("<myxml>");
out.println("<mytag> ...</mytag>");
out.println("</myxml>");
}
Somebody please help..
Thanks in advance..
Seema
___________________________________________________________________________
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
___________________________________________________________________________
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
___________________________________________________________________________
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