| Summary: | HttpService does not work on Servlet 3.0 | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Thomas Watson <tjwatson> |
| Component: | Compendium | Assignee: | Simon Archer <sja.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | akurtakov, gunnar, hmalphettes, john.arthorne, rgrunber, rsternberg, ruediger.herrmann, simon_kaegi, sja.eclipse, yxzhong |
| Version: | 3.7 | ||
| Target Milestone: | Juno M3 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 309529, 346446, 355565 | ||
|
Description
Thomas Watson
The suggestion to use the same org.eclipse.equinox.http.servlet bundle to support both 2.x and 3.0 may prove to be a build nightmare. We may want to consider create a branch that contains the support for 2.x and use master to support 3.0 servlet. Then we would have to consider the need to build both versions during the equinox build. I think we need to investigate this for Juno. We likely should also investigate running with Jetty 8 to test this. I have created a github repository into which I have cloned the Equinox Git repository rt.equinox.bundles.git: remote.origin.url=https://simonjarcher@github.com/simonjarcher/rt.equinox.bundles.git I have just committed my initial changes to the above repository. These changes are still a work-in-progress and are currently being tested. The only project I've changed is org.eclipse.equinox.http.servlet. I had omitted to watch this bug until now. Sorry Simon for the duplicate content and for not starting from your branch eventually. (In reply to comment #5) > I had omitted to watch this bug until now. Sorry Simon for the duplicate > content and for not starting from your branch eventually. Hugues, Notice that Simon has a branch with the latest changes on github at https://github.com/simonjarcher/rt.equinox.bundles/tree/sarcher/servlet30 *** Bug 357286 has been marked as a duplicate of this bug. *** From bug361022 comment7: Chris writes: The only help bundle a minimal RCP app needs is org.eclipse.help, which is still at J2SE 1.4. Without a web server the other help bundles are not going to be of much use to an RCP application. At the risk of digressing from the original bug description I wanted to note some other possible cases of backward incompatibility for help system clients. There are two situations where help could end up using server other than the Jetty version which ships with the SDK. One is when the user creates a war file version of the help infocenter following instructions which are in the help documentation. The other is if the extension point org.eclipse.help.base.server is used to swap in a different help server. Both cases need to be tested and if either or both does not work with servers which do not support Servlet 3.0 ( which seems quite possible ) we need to figure out a fallback strategy. For the webapp as war file we can simply recommend that users that want to host the war file on an older server should use Eclipse 3.8. The org.eclipse.help.base.server extension point is a different story and will need more investigation. (In reply to comment #8) > From bug361022 comment7: Chris writes: > > > The only help bundle a minimal RCP app needs is org.eclipse.help, which is > still at J2SE 1.4. Without a web server the other help bundles are not going to > be of much use to an RCP application. At the risk of digressing from the > original bug description I wanted to note some other possible cases of backward > incompatibility for help system clients. > > There are two situations where help could end up using server other than the > Jetty version which ships with the SDK. One is when the user creates a war file > version of the help infocenter following instructions which are in the help > documentation. The other is if the extension point org.eclipse.help.base.server > is used to swap in a different help server. Both cases need to be tested and if > either or both does not work with servers which do not support Servlet 3.0 ( > which seems quite possible ) we need to figure out a fallback strategy. Our fall back strategy has been to use a proxy in the org.eclipse.equinox.http.servlet and org.eclipse.equinox.jsp.jasper bundles which need to implement things like the ServletContext. The ServletContext got a lot of new methods added in Servlet 3.0. Instead of implementing the ServletContext directly we now use a proxy so that we don't get bitten every time a new method is added to this interface. This allows our support for the HttpServlet and JSP to work on the older Servlet 2.x versions and the JSP < 2.2 versions as well as the latest versions of Servlet and JSP. > > For the webapp as war file we can simply recommend that users that want to host > the war file on an older server should use Eclipse 3.8. I think you meant Eclipse 3.7, but I disagree anyway. The equinox bundles that make up the servlet bridge war should be able to run on both a Servlet 2.x and Servlet 3.0 containers. > The org.eclipse.help.base.server extension point is a different story and will need > more investigation. I agree, anything you can point Simon A. at to investigate/test? (In reply to comment #8) > From bug361022 comment7: Chris writes: > > > The only help bundle a minimal RCP app needs is org.eclipse.help, which is > still at J2SE 1.4. Without a web server the other help bundles are not going to > be of much use to an RCP application. If an RCP application must run on J2SE 1.5 or less and have support for the help web app then they are always free to package the jetty 6, servlet 2.x, jsp 2.1, jasper 5 bundles that we used in 3.7 on top of the Juno release. Here are all my changes to date that have been pushed to: https://github.com/simonjarcher/rt.equinox.bundles/commits/sarcher/servlet30 -- Oct 14, 2011 0264729e44173a17a5acaac6d6b02d83d878be97 (Added optional import package statements for javax.servlet.annotation and javax.servlet.descriptor.) 05061131ff99819ac4b8cc9757b3baf3fdaede81 (Added optional import package statements for javax.servlet.annotation and javax.servlet.descriptor.) d3b7332548dcb5a187c00aec3b1fa2b1e947cd55 (Fixed warnings about synthetic methods in JspServlet.ServletContextAdaptor.) b46e79d2c1332425e40c4ba42cde4f77949cdfb6 (Fixed warning about synthetic method in invoke method.) -- Oct 10, 2011 2c698485a085da2f860bd4861bd88f0007dadddc (Applied polish.) 30689578330be4bb49701aef6e0cd89adad1a8df (Applied polish.) -- Oct 6, 2011 3226bef83e295069111efc0df8443383ce63c043 (Simplify proxy implementation.) 069eef013d86909b0fa26a44f6f744d3213da893 (Update exported javax.* package versions to [2.3,3.1).) b65b3c2bffd5358041a0cebc19e01e25ec61e16a (Initial changes for https://bugs.eclipse.org/bugs/show_bug.cgi?id=341643.) (In reply to comment #11) Thanks Simon, I released your fixes with the following commits. Please check them out to make sure they are what you expect. In the future please commit to your own local git repo using the same e-mail you use for eclipse bugzilla for ease of IP tracking. Also it would help if you commit messages included the bug number (e.g. Bug 341643 - blah blah) to help with tracking our bug fixes. http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=6513742455b898f264df5cb4e3355623eeb9ebaa http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=45c0274c3aeb92f58cd31b45b417a0b3ac962ecb http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=bcb49f062fc476128f34aed1f6f04808a35147d7 http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=45b02f809c784e7389a7f8b901067926d3d8b620 http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=0587f386eb67aa030f74601a13dd328050fe30fd http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=ef8938a081e0e49e652097b6dc9fa96d29f4ce2e http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=2015e422b51f5a791908cddac57ab70a67cb6223 http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=14b64019cb02e4290ba70666c0e627079d21328e http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=8fd8d14ca98e277eea6bb7020285c155e183dcdc Marking this as fixed. Simon please open a separate bug for contributing tests. *** Bug 374621 has been marked as a duplicate of this bug. *** |