Jeremy Boynes wrote:

> The classloading model works fine - the issue is with how the classpath is
> passed to the JSP compiler.
> 
> As I understand it, not being familiar with Jetty/Jasper, Jasper uses an
> Ant Javac task to compile the Java source generated from the JSP. The
> classpath supplied to the Javac task is a ':' (path.separator) delimited
> String. This String is generated by iterating over the context
> classloaders and concatenating all their URLs together (see
> JBossWebApplicationContext.getFileClassPath() and
> JspRuntimeContext.initClassPath()). Any URLs that are not file: are
> discarded as they cannot be converted to a local canonical path.

Yes. ClassLoader.getURLs() is used. 
Few other complonents are added:
- the classpath option ( init param for the servlet, or part of the Option 
object used to construct jasper ).
- system property: java.class.path
- context property: org.apache.catalina.jsp_classpath 

If you need an additional hook - just send a patch to jasper :-)

BTW, ant is used only in jasper2, but the mechanism is similar


> Boot libraries are not copied to the local machine first so have URLs
> based on HOME_URL. Libraries loaded later are copied locally so have URLs
> relative to SERVER_BASE_DIR. Basically boot libraries will have file: or
> http: URLs depending on where the server was booted from; all others will
> have file: URLs due to the local copy.
> 
> As a result boot libraries, even though they are in the thread's
> classloader, are not passed to the JSP compiler because non-file: URLs are
> stripped.

Just set them in the Context or system property ( after you convert them
to file: - javac or jikes can't handle anything else ). That's the hook
most containers use ( or should use ) to pass additional classpath to
jasper.


Costin


> 
> 
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]]On Behalf Of Scott
>> M Stark
>> Sent: Thursday, December 19, 2002 11:01 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: [JBoss-dev] Committed support for remote deployment
>> scanning
>>
>>
>> ----- Original Message -----
>> From: "Jeremy Boynes" <[EMAIL PROTECTED]>
>> To: "Jboss-Development" <[EMAIL PROTECTED]>
>> Sent: Thursday, December 19, 2002 9:50 AM
>> Subject: [JBoss-dev] Committed support for remote deployment scanning
>>
>> > * All WARs must contain all jars needed for JSP compilation. The Jasper
>> >   compiler needs the compilation classpath supplied as a String of
>> >   concatenated local paths and any http: based URLs are
>> excluded. This means
>> >   anything added to the classpath during boot is not available if the
>> >   server was netbooted. This should not be an issue for normal
>> applications
>> >   but was for jmx-console.war which assumed jboss-jmx.jar would
>> be on the
>> >   compilation classpath.
>>
>> This is a big problem and something we have worked to avoid with
>> our 3.0 classloading
>> model. Explain why the boot classpath is not available.
>>
>> xxxxxxxxxxxxxxxxxxxxxxxx
>> Scott Stark
>> Chief Technology Officer
>> JBoss Group, LLC
>> xxxxxxxxxxxxxxxxxxxxxxxx
>>
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.NET email is sponsored by: Geek Gift Procrastinating?
>> Get the perfect geek gift now!  Before the Holidays pass you by.
>> T H I N K G E E K . C O M      http://www.thinkgeek.com/sf/
>> _______________________________________________
>> Jboss-development mailing list
>> [EMAIL PROTECTED]
>> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: Geek Gift Procrastinating?
> Get the perfect geek gift now!  Before the Holidays pass you by.
> T H I N K G E E K . C O M      http://www.thinkgeek.com/sf/





-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now!  Before the Holidays pass you by.
T H I N K G E E K . C O M      http://www.thinkgeek.com/sf/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to