bircastri
bircastri

Reputation: 153

GetClassLoader weblogic error

i have any problems with weblogic 12c.

I have a java web application, it run with TomCat.

No i must trasfer this application on weblogic 12c server. I have chage any file and deploy the application. Found, but i can't read a file.jsp. (This file found correctly on TOMCAT).

I have this strcture:

Folder:

WebContent
- WEB-INF
  -- jsp
     --- errorIdent.jsp

But when i use this cose

InputStream in = 
    this.getClass().getClassLoader().getResourceAsStream("../jsp/errorIdent.jsp");

the inputStream object is null.

For this i try some test case and i find this file only if i put it into WEB-INF/classes

Upvotes: 0

Views: 557

Answers (1)

Dave Newton
Dave Newton

Reputation: 160321

WEB-INF is not on the classpath.

WEB-INF/classes is the root of the classpath.

Libraries in WEB-INF/lib are also put on the classpath.

Why would you want/need to read a JSP file from Java anyway?

Upvotes: 1

Related Questions