I'm not sure this question belongs in this area, but part of it is definitely Servlet-related.
I'm using a custom tag library/page builder servlet to put together my jsp pages. As I understand it, the Servlet gets loaded on startup because it is included within a JSP library. The Servlet goes to the web.xml to find the location of the template that I want to use as a basis for my jsp pages. The Servlet then locates and reads in the file and does some processing. That's all perfect.
My issue is that I can only get this to work if I put the absolute path to the template file in the web.xml. My new supervisor wants me to use a relative path in the web.xml. I have tried putting the template.inc file in various places and using a relative path, but it isn't found using any of these methods. I wasn't sure if it should be relative to the web.xml file, relative to the location of the tag library jar file, or relative to a page that uses the tag library. None worked.
I have the same problem when I use FOP. Within the Java class, I need to locate the .xslt file on the server and it only works when that location is hard-coded.
Is this just the way it is? Is there a reference where I can look it up and show it to my tech lead?
Thanks!