On Mar 15, 2012, at 16:50, Konstantin Kolinko wrote:
> 2012/3/16 Johannes Ernst <[email protected]>:
>> I've implemented my own org.apache.catalina.loader.WebappLoader. It consults
>> a bunch of JARs held in the file system outside of the WAR.
>>
>> One of those outside JARs contains a custom JSP tag.
>>
>> When attempting to compile the JSP, Jasper fails to find it. I'm getting
>> this:
>> javax.servlet.ServletException: org.apache.jasper.JasperException: Unable to
>> compile class for JSP:
>>
>> An error occurred at line: 13 in the jsp file: /foobar.jsp
>> com.example.MyCustomTag cannot be resolved to a type
>
>
>> My guess is that I somehow need to tell Jasper that it should use my custom
>> WebappLoader when looking for custom tags.
>
> You cannot. Jasper is independent from Catalina.
Darn …
> Moreover Jasper has to pass a classpath to an external Java compiler
> (ecj or javac). The classpath is constructed and passed to Jasper as
> String.
Could you point me to where in the code it does this? I was looking for
invocations of something like
WebappLoader.getRepositories()
but came up empty.
>> How would I do that? A few hours worth of poking around in the source code
>> hasn't helped …
>>
>> This is Tomcat 6.0.28 but any answer for any version is appreciated.
>>
>
> Have you looked at VirtualWebappLoader class? I would think it already
> does what you are trying to do.
Does it work with custom JSP tags? If so, I fail to see where it accomplishes
that ...
> I think there were also several fixes to WebappClassLoader in versions
> later than your 6.0.28.
Good to know, thanks.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]