Hi Troels,
I put my properties file into /WEB-INF of my web app. I access
it with
InputStream dmsPropsIn =
servletContext.getResourceAsStream("/WEB-INF/dms.properties");
(servletContext is a variable initialised inside my servlet's
init(): ServletContext servletContext = getServletContext();)
I don't know whether this works with JSP.
Your classes directory isn't below WEB-INF. I think it should be
there. Make sure WEB-INF is in capital letters. In case your
config is working, put /classes before the properties file name.
I think pathToTomcat/webapps/tomcat-docs/appdev/index.html is a
good starting point if you're new to servlets and web app
development.
Hope that helps
Andreas
On 4 Oct 2002 at 9:29, Troels Rossing wrote:
> Hi
>
>
>
> I am new to Slide and Servlets/JSP.
>
>
>
> I have created a taglib with a tag Message which reads a properties
> file.
>
>
>
> But I can't get access to my properties file.
>
>
>
> I deploy the app. In a war file and the structure is as follows.
>
>
>
> myApp
>
> - myJsp
>
> - classes
>
> - myprop.properties
>
> - Message.class
>
> - web-inf
>
> - mylib.tld
>
> - web.xml
>
>
>
> My only problem is the file access for myprop, everything else works
> fine, I use the following to access the file.
>
>
>
> InputStream thefile =
> this.getClass().getResourceAsStream("/myprop.properties");
>
>
>
> I have tried almost any combination of paths (the above is just one of
> them), and the only time I got it to works was when I copied the
> properties file to the shared/classes dir of the tomcat server and when
> I used the absolute path.
>
>
>
> What is the relative root dir to my application, when I deploy the war.
>
>
>
>
>
> Hope someone can help on this issue.
>
>
>
>
>
> Regards
>
>
>
> Troels
>
>
>
> www.Qualiware.com
>
>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>