Thanks for your effective suggestion. My primary objective was to load XSL files independent of any deployment area.
Thanks again, it will certainly help. Sumanta Dutta -----Original Message----- From: Jack Donohue [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 5:14 PM To: '[EMAIL PROTECTED]' Subject: RE: Prob. referring XSL over URI (Pls. consider this out of conte xt p ost) I don't know if this is the most efficient way, but this works for me: If your stylesheet is "/xsl/mystylesheet.xsl" String filename = Thread.currentThread().getContextClassLoader().getResource("/xsl/mystyleshee t.xsl").getFile(); template = TransformerFactory.newInstance().newTemplates(new StreamSource(new File(filename))); -----Original Message----- From: Dutta, Sumanta [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 1:58 PM To: '[EMAIL PROTECTED]' Subject: Prob. referring XSL over URI (Pls. consider this out of context p ost) I am trying to refer my XSL, which generates the FO, over a URI, relative to my http codebase. If I create the XSL source by passing /x/y/z.xsl, the transformer tries to find file://x/y/z.xsl. Is there any way to resolve this in reference to my current http codebase. I tried to do get the servername from http request, and append the URI, which is working in my local test setup, but not good for actual installation, as requests may be coming through different proxies. Any help will be highly appreciated. Thanks, Sumanta Dutta ---------------------------------------------------------------------------- -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. ------------------------------------------------------------------------------ This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.