-
1. Re: ERROR: '/usr/local/jboss-as-7.1.1.Final/bin/./CSV-UTILS.xsl (No such file or directory)'
nickarls Dec 12, 2012 2:35 AM (in response to foutjo)bin is probably the running directory. You'll have to find a better href for it that will use "." as relative position (can't remember syntax)
-
2. Re: ERROR: '/usr/local/jboss-as-7.1.1.Final/bin/./CSV-UTILS.xsl (No such file or directory)'
sfcoy Dec 12, 2012 2:59 AM (in response to foutjo)Ideally, you would package this file in one of the jars that forms part of your application and then read it from the classloader rather than the file system.
The same applies to any of the other xsl files that your application uses.
-
3. Re: ERROR: '/usr/local/jboss-as-7.1.1.Final/bin/./CSV-UTILS.xsl (No such file or directory)'
foutjo Dec 12, 2012 7:45 AM (in response to sfcoy)Thanks for the idea Stephen. What exactly do you mean by reading them from a classloader?
So I take all of xsl files and create a jar file with them. Since I have never done this before I'm
not sure how I would then access the xsl files within the jar from my program. Currently
my program just uses a hard coded path to get to the parent xsl file.
.
-
4. Re: ERROR: '/usr/local/jboss-as-7.1.1.Final/bin/./CSV-UTILS.xsl (No such file or directory)'
sfcoy Dec 12, 2012 8:57 AM (in response to foutjo)It's hard to say without seeing how you're doing it now.
But basically, you do something like:
{code:java}
...
InputStream xslInputStream = this.getClass().getClassLoader().getResourceAsStream("CSV-UTILS.xsl");
StreamSource source = new StreamSource(xslInputStream);
...
{code}
-
5. Re: ERROR: '/usr/local/jboss-as-7.1.1.Final/bin/./CSV-UTILS.xsl (No such file or directory)'
foutjo Dec 18, 2012 8:18 AM (in response to sfcoy)1 of 1 people found this helpfulHaving all of our xsl files in one jar file still did not resolve the issue.
Being that CVS-Utils.xsl was called by a parent xsl file I still was getting
the original error.
Our solution was to have all of our xsl files reside on a web server. We
then created a class that implemented URIResolver. Everytime an href
was found it would get to my new class where I could explicity define
where the http path where all of our xsl files resided. Seems to work
great.
Thanks for all your help.