felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Pauls <karlpa...@gmail.com>
Subject Re: JSP support: works in bridged Equinox HTTP service, _not_ in bridged Felix; _exact_ same bundles
Date Tue, 09 Nov 2010 20:12:13 GMT
I don't know enough about your set-up (i.e., the bundles you use). I
had success with the pax bundles at one point of time so you might
consider using their bundles for jsp. Otherwise, a typical problem in
this area is that equinox is setting the context classloader for
bundles by itself while felix doesn't do that. You might want to try
to set it to the classloader of your bundle. Did you get any error/log
messages btw?

regards,

Karl

On Tue, Nov 9, 2010 at 2:53 AM, Misha Koshelev <misha680@gmail.com> wrote:
> Dear All:
>
> Sorry to bother... I have included detailed instructions here:
> http://tickets.openmrs.org/browse/TRUNK-1596?focusedCommentId=163216&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_163216
>
> but the gist is that using JSP support that exists for Equinox container:
> http://www.eclipse.org/equinox/server/jsp_support.php
>
> I _am_ able to get JSPs to function properly in Equinox servlet
> bridge, but _not_ in Felix.
>
> We (OpenMRS) like Felix as it is, in fact, quite Maven friendly,
> whereis Equinox does not seem to be :(
>
> The only thing that I am doing that may be somewhat non-kosher is the line:
> sed -i "s/javax.servlet;javax.servlet.http;version=2.5/javax.servlet;javax.servlet.http;javax.servlet.resources;version=2.5/"
> WEB-INF/framework.properties
>
> As otherwise javax.servlet.resources is not found. This seems to be a
> bunch of DTD files in javax.servlet, but is not present (from what I
> can tell) _either_ in my Equinox or Felix setup.
>
> Clearly, the pages _are_ being served correctly, and the _only_ quirk
> is that JSP expression fail to be evaluated at all in Felix but _not_
> in Equinox.
>
> Additionally, taglibs are not loaded at all.
>
> My WEB-INF/bundles folder:
>
> WEB-INF/bundles/org.eclipse.equinox.http.helper-1.0.0.jar
> WEB-INF/bundles/org.eclipse.equinox.jsp.examples_1.0.0.jar
> WEB-INF/bundles/org.apache.felix.http.samples.filter.jar
> WEB-INF/bundles/com.springsource.javax.el-1.0.0.jar
> WEB-INF/bundles/com.springsource.org.apache.taglibs.standard-1.1.2.jar
> WEB-INF/bundles/org.eclipse.equinox.jsp.jasper_1.0.0.v20070607.jar
> WEB-INF/bundles/org.springframework.osgi.jasper.osgi_5.5.23.SNAPSHOT.jar
> WEB-INF/bundles/com.springsource.javax.servlet.jsp.jstl-1.1.2.jar
> WEB-INF/bundles/com.springsource.org.apache.commons.el-1.0.0.jar
> WEB-INF/bundles/org.apache.felix.webconsole.jar
> WEB-INF/bundles/org.apache.felix.http.bridge.jar
> WEB-INF/bundles/com.springsource.javax.servlet.jsp-2.1.0.jar
> WEB-INF/bundles/com.springsource.org.apache.commons.logging-1.0.4.jar
>
> otherwise, besides changing framework.properties and the bundle
> additions, completely unmodified from default 2.0.4 bridge example.
>
> Any thoughts?
>
> Thank you
> Misha
>
> p.s. I have not investigated, but I could not quickly find a way to
> use the embedded "web console" feature, and see the errors below. I
> doubt this would be helpful (all packages are clearly resolved and
> installed as the JSP example package works - at least to my
> understanding), but it would be nice to have _proof_ of this:
> [INFO] Started bridged http service
> 2010-11-08 19:27:39.847:WARN:felix-bridge:OSGi framework startednull
> *INFO * Failed to instantiate plugin
> org.apache.felix.webconsole.internal.compendium.ComponentsServlet.
> Reason: java.lang.NoClassDefFoundError:
> org.apache.felix.scr.ScrService
> *INFO * Failed to instantiate plugin
> org.apache.felix.webconsole.internal.misc.ShellServlet. Reason:
> java.lang.NoClassDefFoundError: org.apache.felix.shell.ShellService
> #
>
> p.p.s. Same exact results on trunk.
>
> Here are slightly modified instructions for trunk.
>
> cd /tmp
> rm -rf felix > /dev/null 2>&1
> mkdir felix
> cd felix
> svn checkout http://svn.apache.org/repos/asf/felix/trunk/http/ -q
> cd http
> mvn clean install -DskipTests
> mkdir tmp
> cp samples/bridge/target/org.apache.felix.http.samples.bridge-2.0.5-SNAPSHOT.war
> tmp
> cd tmp
> jar xvf org.apache.felix.http.samples.bridge-2.0.5-SNAPSHOT.war
> sed -i "s/javax.servlet;javax.servlet.http;version=2.5/javax.servlet;javax.servlet.http;javax.servlet.resources;version=2.5/"
> WEB-INF/framework.properties
> cd WEB-INF/bundles
> wget http://repository.springsource.com/ivy/bundles/external/javax.el/com.springsource.javax.el/1.0.0/com.springsource.javax.el-1.0.0.jar
> wget http://repository.springsource.com/ivy/bundles/external/javax.servlet/com.springsource.javax.servlet.jsp/2.1.0/com.springsource.javax.servlet.jsp-2.1.0.jar
> wget http://repository.springsource.com/ivy/bundles/external/javax.servlet/com.springsource.javax.servlet.jsp.jstl/1.1.2/com.springsource.javax.servlet.jsp.jstl-1.1.2.jar
> wget http://repository.springsource.com/ivy/bundles/external/org.apache.commons/com.springsource.org.apache.commons.el/1.0.0/com.springsource.org.apache.commons.el-1.0.0.jar
> wget http://repository.springsource.com/ivy/bundles/external/org.apache.commons/com.springsource.org.apache.commons.logging/1.0.4/com.springsource.org.apache.commons.logging-1.0.4.jar
> wget http://repository.springsource.com/ivy/bundles/external/org.apache.taglibs/com.springsource.org.apache.taglibs.standard/1.1.2/com.springsource.org.apache.taglibs.standard-1.1.2.jar
> wget http://mirrors.ibiblio.org/pub/mirrors/maven2/org/eclipse/equinox/jsp/jasper/1.0.0-v20070607/jasper-1.0.0-v20070607.jar
> -O org.eclipse.equinox.jsp.jasper_1.0.0.v20070607.jar
> wget http://maven.springframework.org/osgi/org/springframework/osgi/jasper.osgi/5.5.23-SNAPSHOT/jasper.osgi-5.5.23-20080229.204604-1.jar
> -O org.springframework.osgi.jasper.osgi_5.5.23.SNAPSHOT.jar
> wget http://dist.wso2.org/maven2/org/eclipse/equinox/org.eclipse.equinox.http.helper/1.0.0/org.eclipse.equinox.http.helper-1.0.0.jar
> wget http://tickets.openmrs.org/secure/attachment/34885/org.eclipse.equinox.jsp.examples_1.0.0.jar.bz2
> && bunzip2 *.bz2
> cd ../..
> rm ../../felix-bridge.war > /dev/null 2>&1
> jar cvMf ../../felix-bridge.war *
>
> You will need to deploy /tmp/felix/felix-bridge.war
>
> Your help _much_ appreciated. Thank you!
>
> Yours
> Misha
>



-- 
Karl Pauls
karlpauls@gmail.com

Mime
View raw message