Re: Solution for finding images in a WAR file

2003-01-21 Thread Johan Åbrandt
m( resourceBundlePath.toString() ); } catch( IOException ioe ) { inputStream.close(); throw ioe; } return inputStream; } // end of method getResourceAsStream } -Original Message- From: Rakesh Patel [mailto:[EMAIL PROTECTED] Sent: Monday, January 20, 2003 11:30 AM T

Re: Solution for finding images in a WAR file

2003-01-21 Thread Johan Åbrandt
This "solution" may or may not work in existing servers, but it may also break. The problem is that ServletContext->getRealPath() is allowed to return null, for example if the content is served from a WAR. Rakesh Patel wrote: Hi, I have found a solution that I think works (have not got access to

RE: Solution for finding images in a WAR file

2003-01-20 Thread Sharma, Siddharth
return inputStream; } // end of method getResourceAsStream } -Original Message- From: Rakesh Patel [mailto:[EMAIL PROTECTED] Sent: Monday, January 20, 2003 11:30 AM To: [EMAIL PROTECTED] Subject: Solution for finding images in a WAR file Hi, I have found a solution that

Solution for finding images in a WAR file

2003-01-20 Thread Rakesh Patel
Hi, I have found a solution that I think works (have not got access to a Unix environment to confirm this) but I did not hard-code any window/unix specific paths. Here's a snippet of code I used: ServletContext scntxt = this.getServletContext(); String pathToFile = scntxt.getRealPath("/WEB-INF