Re: JSP support: works in bridged Equinox HTTP service, _not_ in bridged Felix; _exact_ same bundles
Hi Karl: Thank you for your helpful comment. I seem to have a working Equinox implementation atm, so I'll that be for now :) However, your statement about the pax bundles piqued my curiosity? Did you mean that you used: http://mvnrepository.com/artifact/org.ops4j.pax.web/pax-web-jsp/0.8.0 or something similar inside the Apache Felix _servlet bridge_??? It seems like you were able to get additional features besides a plain vanilla HTTP Service (at least JSP support), which would be quite interesting... I only ask because I know Pax Web itself does not have a servlet _bridge_ mode per my understanding (or at the very least does not have a servlet bridge mode that provides advantages over a traditional HTTP Service): http://lists.ops4j.org/pipermail/general/2010q4/004794.html Hi Misha, I think your assessment is correct about http services. Pax web won't bring you any advantages if you want to operate in a bridged mode. ... -Andreas (and penultimate comment here: http://forum.springsource.org/archive/index.php/t-55655.html) On Tue, Nov 9, 2010 at 2:12 PM, Karl Pauls karlpa...@gmail.com wrote: 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 misha...@gmail.com wrote: Dear All: Sorry to bother... I have included detailed instructions here: http://tickets.openmrs.org/browse/TRUNK-1596?focusedCommentId=163216page=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 21 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
Re: JSP support: works in bridged Equinox HTTP service, _not_ in bridged Felix; _exact_ same bundles
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 misha...@gmail.com wrote: Dear All: Sorry to bother... I have included detailed instructions here: http://tickets.openmrs.org/browse/TRUNK-1596?focusedCommentId=163216page=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 21 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
JSP support: works in bridged Equinox HTTP service, _not_ in bridged Felix; _exact_ same bundles
Dear All: Sorry to bother... I have included detailed instructions here: http://tickets.openmrs.org/browse/TRUNK-1596?focusedCommentId=163216page=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 21 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