Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Tld support for Jetty in OSGi

Hi Chris,

>From jetty-7.5 onwards we are using jsp-impl-2.1.3.b10. For your
reference, here's our wiki page on jsp:
http://wiki.eclipse.org/Jetty/Howto/Configure_JSP

The main difference is the way that the new version of jasper expects
to find the tlds. As we were doing previously, we need to examine jars
to find META-INF/tlds, but now we need to pre-load them into a
collection (org.apache.jasper.compiler.TldLocationsCache) that jasper
is holding onto that defines "system" tlds (ie tlds that are on the
container's classpath, not the webapp's classpath). Jasper is very
strict about tld urls and which ones it will consider on the webapp's
vs the containers classpath. For example, the jstl tags (and I think
the faces tags too, but I can't remember right now) it will only ever
consider as being on the system classpath, so putting those jars into
a webapp will do you no good, they have to be on the container's
classpath.

I just need to work out how to marry this concept of system/webapp
classpath with osgi. The code that we need is in the
org.eclipse.jetty.webapp.TagLibConfiguration  in standard jetty and
the class I need to modify in the osgi code is
org.eclipse.jetty.osgi.boot.jsp.TagLibOSGIConfiguration.

I hope to have something for you to test today, but I'm being impeded
by other problems getting our osgi unit tests to work - I think
they're tangential problems but I need to resolve those before I can
get to the Taglib stuff.

cheers
Jan



On 6 March 2012 21:54, Chris Frost <frostc@xxxxxxxxxx> wrote:
> Hi,
>
> Could you clarify what the changes of glassfish jasper between 7.4 and 7.6 are. As far as I can tell they are both on 2.1.0. Jetty ships with 2.1.0.v201007080150 on 7.4 and 1.2.0.v201112081803 on 7.6.
>
> Chris.
>
> ----- Original Message -----
> From: "Jan Bartel" <janb@xxxxxxxxxxx>
> To: "Jetty @ Eclipse developer discussion list" <jetty-dev@xxxxxxxxxxx>
> Sent: Monday, 5 March, 2012 11:14:41 PM
> Subject: Re: [jetty-dev] Tld support for Jetty in OSGi
>
> Hi Chris,
>
> The problem is no doubt due to the change of glassfish jasper versions
> between 7.4 and 7.5. We need to be able to satisfy glassfish jasper's
> requirements for the location of the tlds, some of which are required
> to be on the container's classpath. So we need to meld osgi's concept
> of classpath with glassfish jasper's expectations.
>
> I'm a mere osgi novice, but I'm happy to take a look at the code and
> see if I can improve things. I don't really have an environment where
> I can easily test - if I make some code changes do you have
> environment where we could test them out??
>
> thanks
> Jan
>
>
>
> On 6 March 2012 03:21, Chris Frost <frostc@xxxxxxxxxx> wrote:
>>
>> Hi,
>>
>> I've upgraded from 7.4.x to 7.6.x and support for the standard tag libraries appears to have gone away. This was previously working as the 'org.eclipse.jetty.osgi.boot.jsp' fragment imported them in from the 'org.apache.taglibs.standard.glassfish' bundle. Looking at the wirings this is still the case but when trying to display a jsp page using tag libs it now fails with an exception saying the URL associated with one of the tag libs can't be resolved. For example "http://java.sun.com/jsp/jstl/core";.
>>
>>
>> Ideally we could get the 'Require-TldBundle' header working so that each application can specifically it's Tld bundles instead of a server wide setup or depending on fragments of the osgi boot bundle. This has been a problem for a while and is documented in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=349009 with a zip of Virgo to recreate. It's a few versions out of date but nothing appears to have changed in the behaviour. It appears the documentation on how to use this header never got written so I've just followed the config provided in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=306971 but enabling it just breaks something very basic and Jetty can't even find static html files and there is nothing in the log saying it has had any problems. I've tried debugging through this but I'm not sure where the entry point is for http requests and I can't spot anything obvious in the code that processes the configuration.
>>
>> While the standard tag libraries are still working on the 8.x line the 'Require-TldBundle' header is broken on both 8.x and 7.x
>>
>> Chris.
>>
>>
>> Christopher Frost - VMware
>> Virgo from EclipseRT
>>
>> _______________________________________________
>> jetty-dev mailing list
>> jetty-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
> _______________________________________________
> jetty-dev mailing list
> jetty-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-dev
> _______________________________________________
> jetty-dev mailing list
> jetty-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top