Community
Participate
Working Groups
Build Identifier: Not relevant as this is a documentation bug My goal is to try to use JSP support with an OSGi HTTP Service for OpenMRS conversion to OSGi: http://tickets.openmrs.org/browse/TRUNK-1596 I have so far tested successfully with the Spring DM Web Extender, but this does not support the "servlet bridge" feature. http://static.springsource.org/osgi/docs/current/reference/html/web.html Unfortunately, I have found the following Wiki's to be out of date: http://www.eclipse.org/equinox/server/http_in_container.php http://www.eclipse.org/equinox/server/http_in_equinox.php http://www.eclipse.org/equinox/server/jsp_support.php At the very least, a note about this should be put at the top of the page. Some examples: * All PSF's point to many bundles which are no longer hosted on eclipse CVS repo, but rather p2 * http://www.eclipse.org/equinox/server/http_in_container.php I was not able to use the Build Information _at all_. Specifically, the statement "org.eclipse.equinox.servletbridge contains an ant script in "/scripts/webAppBuilder.xml" is _not_ true as of the HEAD version. There is no such file in _either_ the bundle or feature (as far as I can find). As we are using a Maven-based build, there is even a Maven bundle http://mvnrepository.com/artifact/org.eclipse.equinox/servletbridge but it was not clear from the bundle how it could be used. I still don't know how to actually build the servletbridge from source, which is a shame. Reasons to _update bridge.war file_ if not _build instructions_: per https://bugs.eclipse.org/bugs/show_bug.cgi?id=128068#c18 it looks like filter support _may_ be available in Equinox Server-Side trunk (I am _not_ clear as to whether or not this is present in servlet bridge as well - any help much appreciated). As this is the only feature present in Apache Felix HTTP Service _not_ present in Equinox HTTP Service (besides Maven support), this would be quite important to mention if it is, indeed, present. Luckily, I finally did _make_ the JSP examples work. An important note (perhaps this should be on the pages referenced) is that Eclipse 3.7 is required to build HEAD packages. Otherwise, I would get strange errors like "Bundle cannot be resolved to a type" upon checkout of some of the packages. Thank you very much to rcjsuen for his input on the IRC freenode channel #eclipse. Finally, I _did_ get the JSP example to work in a servlet-bridge and this involved the following steps: 1. Used bridge.war http://www.eclipse.org/equinox/server/downloads/bridge.war (dated 2007???) under Quick Start in http://www.eclipse.org/equinox/server/http_in_container.php 2. Downloaded and install Eclipse 3.7M3 http://download.eclipse.org/eclipse/downloads/ 3. Checkout :pserver:anonymous@dev.eclipse.org:/cvsroot/rt org.eclipse.equinox/incubator/server-side/bundles/org.eclipse.equinox.http.helper and exported as a plug in using "Export wizard" (I will try to attach relevant JAR) from the META-INF/MANIFEST.MF editor page. 4. Also imported and used the "Export wizard" to create plug ins for the following JSP examples: http://prdownloads.sourceforge.net/sse-examples/org.eclipse.equinox.jsp.jstl-proj.zip?download http://prdownloads.sourceforge.net/sse-examples/org.eclipse.equinox.jsp.examples-proj.zip?download from http://www.eclipse.org/equinox/server/jsp_support.php (will also try to attach) 5. Used plugins: javax.servlet.jsp_2.0.0.v200806031607.jar org.apache.commons.el_1.0.0.v201004212143.jar org.apache.commons.logging_1.0.4.v201005080501.jar org.eclipse.equinox.jsp.jasper_1.0.200.v20100421.jar from my eclipse 3.7M3 plugins directory to create a bridge.war with the following files under WEB-INF/eclipse/plugins: javax.servlet.jsp_2.0.0.v200806031607.jar org.apache.commons.el_1.0.0.v201004212143.jar org.apache.commons.logging_1.0.4.v201005080501.jar org.apache.jasper_5.5.17.v201004212143.jar org.eclipse.equinox.common_3.3.0.200704022148.jar org.eclipse.equinox.http.helper_1.0.0.201011071734.jar org.eclipse.equinox.http.registry_1.0.0.200704022148.jar org.eclipse.equinox.http.servlet_1.0.0.200704022148.jar org.eclipse.equinox.http.servletbridge_1.0.0.200704022148.jar org.eclipse.equinox.jsp.examples_1.0.0.jar org.eclipse.equinox.jsp.jasper_1.0.200.v20100421.jar org.eclipse.equinox.jsp.jstl_1.0.0.jar org.eclipse.equinox.registry_3.3.0.v20070318.jar org.eclipse.osgi_3.3.0.200704022148.jar org.eclipse.osgi.services_3.1.100.200704022148.jar org.eclipse.update.configurator_3.2.100.v20070322.jar sample.http_1.0.0.jar (Note sample.http is http://www.eclipse.org/equinox/server/downloads/sample-http.zip from http://www.eclipse.org/equinox/server/http_in_container.php under Quickstart). 6. Deployed in Jetty 7: http://download.eclipse.org/jetty/stable-7/dist/ by copying the _new_ bridge.war to the webapps folder under jetty, and then doing a java -jar start.jar in the main jetty folder 7. Finally, opened my browser to: http://localhost:8080/bridge/jsp-examples/index.html Another important note that I _totally_ missed from the pages (my bad most likely) is that JSP support does _not_ work with org.eclipse.equinox.http (the non-Jetty based, simple HTTP Container) but _does_ work with servletbridge. I finally understood this from a non-Eclipse (also somewhat outdated) site: http://dev.nepomuk.semanticdesktop.org/wiki/JspPagesInOsgi "First we need a servlet container compatible with Servlet API v. 2.4." We are currently using Apache Felix HTTP Service as this is a Maven-based build that is easier to integrate into OpenMRS, and JSP support does _not_ seem to be working. I am not sure if this is the same issue or not. However, I believe it is important to document. Specifically, http://www.eclipse.org/equinox/server/jsp_support.php does state that "The JSP Support requires an HTTP Service that provides support for the Servlet 2.4 API. (See Jetty in Embedding Equinox in a Servlet Container or Embedding an HTTP server in Equinox -- Note: modification of the servletbridge is no longer needed.)" However, I believe an _explicit_ statement should be made that org.eclipse.equinox.http does _not_ work with JSP support (at least it doesn't per my tries). Thank you for a wonderful product. I look forward to documentation updates sometime in the future if possible. Yours Misha Reproducible: Always
Created attachment 182656 [details] org.eclipse.http.helper plug in compiled on Eclipse 3.7M3 from HEAD
Created attachment 182657 [details] org.eclipse.jsp.jstl compiled on Eclipse 3.7M3, from http://prdownloads.sourceforge.net/sse-examples/org.eclipse.equinox.jsp.jstl-proj.zip?download
Created attachment 182658 [details] org.eclipse.jsp.examples compiled on Eclipse 3.7M3, from http://prdownloads.sourceforge.net/sse-examples/org.eclipse.equinox.jsp.examples-proj.zip?download
Created attachment 182660 [details] Here is a working servletbridge with HTTP sample and JSP examples (part i) Go to: http://localhost:8080/bridge/helloworld.html http://localhost:8080/bridge/helloworld/ to see sample.http Go to: http://localhost:8080/bridge/jsp-examples/index.html to see JSP examples
Created attachment 182662 [details] 182660: Here is a working servletbridge with HTTP sample and JSP examples (part ii) To join: bunzip *.bz2 cat bridge-works.war.split.1 bridge-works.war.split.2 > bridge-works.war Thank you Misha
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.