kincaidscott
Programmer
I am having problems trying to get resources from the ServletContext and from classes. When I run the following code:
I get a url like:
The application can't figure out how to get the file. I have circumvented this error by adding a snippet of code that changes "classloader" to "file". But, I just found out that this application is having this problem all over the place. Another instance:
This does the same thing, returning a URL beginning with "classloader". Is this a WebSphere thing? If so, is there a way to change it? I've been looking all day and haven't found much information except a piece of code that changes "classloader" to "file". I just ran the fixpack so I've got WebSphere 3.5.6.
Thanks in advance!!
Code:
url = servletContext.getResource("/test.xsl");
I get a url like:
Code:
classloader:c:/webpshere/appserver/hosts/cp/test.xsl
The application can't figure out how to get the file. I have circumvented this error by adding a snippet of code that changes "classloader" to "file". But, I just found out that this application is having this problem all over the place. Another instance:
Code:
this.getClass().getResource(sslLocation).toString();
This does the same thing, returning a URL beginning with "classloader". Is this a WebSphere thing? If so, is there a way to change it? I've been looking all day and haven't found much information except a piece of code that changes "classloader" to "file". I just ran the fixpack so I've got WebSphere 3.5.6.
Thanks in advance!!