Saturday, February 27, 2016

Can't acces to a .properties file directly in .war not WEB-INF


We have an old project not with maven where properties file is directly in WAR file directory not on WEB-INF or class directory.

We have tried without succes many reading method like

       InputStream in = this.getClass().getClassLoader().getResourceAsStream(file1);
       InputStream in =;
       path = RequestFactoryServlet.getThreadLocalServletContext().getRealPath(file1);
       InputStream in = ServletContext.class.getResourceAsStream(file1);
       URL url ="/"+file1);
       InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(file1);
We tried acces properties file from server part of this project
Where is my mistake ?


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment