org.eclipse.jetty.osgi.boot.jasper
Class PluggableWebAppRegistrationCustomizerImpl

java.lang.Object
  extended by org.eclipse.jetty.osgi.boot.jasper.PluggableWebAppRegistrationCustomizerImpl
All Implemented Interfaces:
WebappRegistrationCustomizer

public class PluggableWebAppRegistrationCustomizerImpl
extends Object
implements WebappRegistrationCustomizer

Plug bundles that contains tld files so that jasper will discover them and set them up in jetty. For example: -Dorg.eclipse.jetty.osgi.tldbundles=org.springframework.web.servlet,com.opensymphony.module.sitemesh Otherwise use an attribute to the WebAppDeployer <New class="org.eclipse.jetty.deploy.providers.WebAppProvider"> .... <Set name="tldBundles"><Property name="org.eclipse.jetty.osgi.tldsbundles" default="" /></Set> <New>


Field Summary
static String SYS_PROP_TLD_BUNDLES
          To plug into jasper bundles that contain tld files please use a list of bundle's symbolic names: -Djetty.osgi.tldbundles=org.springframework.web.servlet,com.opensymphony.module.sitemesh
 
Fields inherited from interface org.eclipse.jetty.osgi.boot.utils.WebappRegistrationCustomizer
CLASS_NAME
 
Constructor Summary
PluggableWebAppRegistrationCustomizerImpl()
           
 
Method Summary
 URL[] getJarsWithTlds(OSGiAppProvider provider, BundleFileLocatorHelper locatorHelper)
          TODO: right now only the jetty-jsp bundle is scanned for common taglibs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYS_PROP_TLD_BUNDLES

public static final String SYS_PROP_TLD_BUNDLES
To plug into jasper bundles that contain tld files please use a list of bundle's symbolic names: -Djetty.osgi.tldbundles=org.springframework.web.servlet,com.opensymphony.module.sitemesh

See Also:
Constant Field Values
Constructor Detail

PluggableWebAppRegistrationCustomizerImpl

public PluggableWebAppRegistrationCustomizerImpl()
Method Detail

getJarsWithTlds

public URL[] getJarsWithTlds(OSGiAppProvider provider,
                             BundleFileLocatorHelper locatorHelper)
                      throws Exception
Description copied from interface: WebappRegistrationCustomizer
TODO: right now only the jetty-jsp bundle is scanned for common taglibs. Should support a way to plug more bundles that contain taglibs. The jasper TldScanner expects a URLClassloader to parse a jar for the /META-INF/*.tld it may contain. We place the bundles that we know contain such tag-libraries. Please note that it will work if and only if the bundle is a jar (!) Currently we just hardcode the bundle that contains the jstl implemenation. A workaround when the tld cannot be parsed with this method is to copy and paste it inside the WEB-INF of the webapplication where it is used. Support only 2 types of packaging for the bundle: - the bundle is a jar (recommended for runtime.) - the bundle is a folder and contain jars in the root and/or in the lib folder (nice for PDE developement situations) Unsupported: the bundle is a jar that embeds more jars.

Specified by:
getJarsWithTlds in interface WebappRegistrationCustomizer
Returns:
The location of the jars that contain tld files. Jasper will discover them.
Throws:
Exception


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.