Hi Everyone,

In my application (Tap 4.1.1) I am trying to implement a parser to parse an xml file, which works well enough with an absolute path, but when I retrieve the file using a relative path Tapestry returns an empty java.io.ByteArrayInputStream. If the path is specified incorrectly an exception is thrown, so I am pretty confident that the path is okay.

This is what I tried:

@Asset("context:/XML/irmsitemap.xml")
public abstract IAsset getNavigationMap();

InputStream stream = getNavigationMap().getResourceAsStream();

I also tried:
InputStream stream = getServletContext().getResourceAsStream("/XML/irmsitemap.xml");

My folder structure looks like this:

+context
   -CSS
      ...
  - XML
      irmsitemap.xml
   - WEB-INF
       classes
lib
   etc...

any ideas?
Thanks
Peter



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to