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

Reply via email to