• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

relative path for XSL

 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having trouble referencing my stylesheets in a relative way. Currently, we have the paths to the style sheets hardcoded. (The JSP pages that contain the following lines are in the tm directory)
processor.process(new XSLTInputSource(doc.getDocumentElement()), new XSLTInputSource("file:c:\\progra~1\\allaire\\jrun\\servers\\default\\tm\\xslfiles\\loadstatus.xsl"), htmlstream);}catch(Exception e){System.out.println(e.getMessage()); e.printStackTrace();}
When I try different things for the parameter to the 2nd XLSTInputSource class instantiation, nothing seems to work:
new XLSTInputSource("\\xslfiles\\loadstatus.xsl"); x
new XLSTInputSource("xslfiles\\loadstatus.xsl"); x
What do I need to do to make the relative path work? We will be deploying this on different servers so we don't want to have to set up some absolute path.
Thanks for the help!
Brian Nice
bcnice@mindspring.com
 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it now. I needed to include the application root directory in the path name. So something like the following works:
processor.process(new XSLTInputSource(doc.getDocumentElement()), new XSLTInputSource("tm/xslfiles/result.xsl"), htmlstream);
Brian
 
reply
    Bookmark Topic Watch Topic
  • New Topic