Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Andrei Miclaus wrote:but I don't believe that placing them together with the java class files is that good...
First, just to make one thing clear: you should NEVER write files to a WAR. It not only violates the Java standards, it can cause serious pain and suffering. So any files in a WAR should be read-only.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:Your getResourceAsStream failed because it's an instance method, not a class method. You need the actual HttpServletRequest object, not its class.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Andrei Miclaus wrote:
Thanks to your tips and chapter "Accessing Passive Server Resources" from novocode (http://www.novocode.com/doc/servlet-essentials/chapter3.html#ch_3_3) I managed to get my XML file with the Servlet Context
My POIList.xml file is now under WEB-INF/data/POIList.xml, it works and i feel happy.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |