Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL problems

Status
Not open for further replies.

kincaidscott

Programmer
Jun 12, 2002
1
US
I am having problems trying to get resources from the ServletContext and from classes. When I run the following code:

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!!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top