This content has been marked as final.
Show 2 replies
-
1. Re: ear: read a file from webapplication
nishan_inapp Mar 6, 2008 3:10 AM (in response to mars1412)You may want to try ;
URL fileURL = this.getClass().getResource("img\mypic.gif");
-
2. Re: ear: read a file from webapplication
mars1412 Mar 6, 2008 4:34 AM (in response to mars1412)tx for the reply
actually I just looked into the seam source how the seam.properties file is read and came up with this solution:javax.faces.context.FacesContext facesContext = javax.faces.context.FacesContext.getCurrentInstance(); ServletContext servletContext = (ServletContext)facesContext.getExternalContext().getContext(); InputStream is = Resources.getResourceAsStream("img\mypic.gif", servletContext);