Hello,

I am getting this error org.apache.jasper.JasperException: The absolute uri: <requiredURI> cannot be resolved in either web.xml or the jar files deployed with this application. Although the required jar is present in the classpath I am still facing this issue. But if I insert the same jar into web-inf/lib folder the error seems disappear. I do not want to put this jar in the lib folder as it is already included in the classpath. Any suggestion to resolve this issue?

yes, add it to the WEB-INF/lib folder.
That's the classpath for a web application, everything else is ignored except those classes provided implicitly by the application server (the JEE and standard libraries, and sometimes things in an ext lib directory as defined by the application server (which would be specific to that server).

The system classpath should NEVER be relied upon by anything. And neither should you expect the web application to inherit the classpath settings provided by starting up the application server.

Im refering to the classpath for my web application. Without adding the jar in WEB-INF/lib folder I am able to include the jar file in my web application classpath. When I used a echo statement in my ant script I was able to see the jar I am expecting, which should be sufficient to compile and build. But, unfortunately when im running my jsp-compilation target in my ant script it says the jsp-tag jar required in one of the files is not available for completing jsp compilation.

so you added it to the classpath for ANT (why are you still using ANT btw, nobody does so...).
That is NOT the classpath for the application, nor is it the classpath for the JSP compiler (why are you running that from inside the ANT script btw? Utter nonsense).

Sorry for the delayed response. This was some age old code I was trying to modifying. Re- writing the entire build script worked for me. Anyway, thanks for all the suggestions.

This article has been dead for over six months. Start a new discussion instead.