Hello,
I'm doing an XML->PDF XSLT transformation using a XSL stylesheet.
Programmatically, within my Action class, I refer to the stylesheet needed
by using a relative path, with the goal of it being relative to my appname
directory off of the servlet "webapps" directory:
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new
StreamSource("stylesheets\\mystylesheet.xsl"));
..
Problem is, Struts appears to be resolving relative paths from my project
working directory, *not* relative to the "appname" from the webapps
directory in Tomcat.
To confirm this, removing the xsl stylesheet from my working directory
returned this error when I ran the app in Tomcat:
java.io.FileNotFoundException:
D:\myworkingdir\myapp\stylesheets\mystylesheet.xsl
and not this error:
java.io.FileNotFoundException:
D:\tomcat4.1\webapps\myapp\stylesheets\mystylesheet.xsl
How do I specify filenames in Struts so they will be resolved relative to
the webapps\myapp directory (whatever I name "myapp" to be), and not my
(deleteable) working directory?
Thanks,
Glen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]