| Summary: | Use WAR product for ServletBridge in dev-mode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Angelo ZERR <azerr> | ||||
| Component: | Libra | Assignee: | Project Inbox <libra.warproducts-inbox> | ||||
| Status: | NEW --- | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | azerr, gregory.amerson, holger.staudacher, jeffmcaffer, kaloyan | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Angelo ZERR
Hi Angelo, sounds interesting. It would be good if you can provide tests with your patch. That makes it easier for me to apply it. (In reply to comment #1) > Hi Angelo, > sounds interesting. It would be good if you can provide tests with your patch. > That makes it easier for me to apply it. Hi Holger, Thank a lot for your interesment. I will see your test to see which test I will able to. For the moment I'm trying some code to manage my idea. Now I can generate a well config.ini in the Eclipse Project as soon as warproduct is generated. Now I must generated a dev.properties file (like the OSGi launch) to set the bin folder as sources for bundles coming from workspace. ServletBridge should be modified too to support dev.properties (osgi.dev parameter). But I have some troubles with your validation (Validate WAR Product) : * it requires "org.eclipse.equinox.servletbridge.extensionbundle". * "org.eclipse.update.configurator" is banned. I don't know if you know that but ServletBridge generate the org.eclipse.equinox.servletbridge.extensionbundle fragment to export javax.servlet packages (coming from the System Library wich comes from the Server). When your server support javax.servlet.http (2.5) it export package like this "javax.servlet.http; version=2.5". Here the generated MANIFEST.MF : ----------------------------- Manifest-Version: 1.0 Export-Package: org.eclipse.equinox.servletbridge; version=1.1, javax. servlet; version=2.5, javax.servlet.http; version=2.5, javax.servlet. resources; version=2.5 Fragment-Host: system.bundle; extension:=framework Bundle-Version: 1.2.0 Bundle-Name: Servletbridge Extension Bundle Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.equinox.servletbridge.extensionbundle ----------------------------- When your server support javax.servlet.http (3.0), it generate "javax.servlet.http; version=3.0". org.eclipse.equinox.servletbridge.extensionbundle fragment is used too use teh extendedFrameworkExports declaration in the BridgeServlet. For instance if you write this in the web.xml : <init-param> <param-name>extendedFrameworkExports</param-name> <param-value>com.mycompany.exports; version=1.0.0</param-value> </init-param> Export-Package: will contains com.mycompany.exports; version=1.0.0 If you wish use generated org.eclipse.equinox.servletbridge.extensionbundle (generated when BridgeServlet start) you must add "org.eclipse.update.configurator" bundle (I don't why, but my test tell me that). So I think we should support 2 modes : * use a static "org.eclipse.equinox.servletbridge.extensionbundle" bundle like you have validated. In this case "org.eclipse.equinox.servletbridge.extensionbundle" is required in the product and "org.eclipse.update.configurator" is banned. * use generated "org.eclipse.equinox.servletbridge.extensionbundle". In this case "org.eclipse.equinox.servletbridge.extensionbundle" is banned in the product and "org.eclipse.update.configurator" is required. I think it should be cool if we have a new Tab Page called for instance "BridgeServlet") which is the configuration of the BridgeServlet : * support static/generated "org.eclipse.equinox.servletbridge.extensionbundle". Switch the option, validation must be different : * manage servlet-mapping (/*....) * manage init-param : * enableFrameworkControls : true/false * commandline : text field. * extendedFrameworkExports : with a help with available packages * frameworkLauncherClass : by default with blank value. I think it should be cool too if we can manage start+level bundles. I have seen that https://bugs.eclipse.org/bugs/show_bug.cgi?id=322281 Indead, for the moment I generate a config.ini with @start for the whole bundles. IMHO I think "Configuration" tab should be renamed with "Dependencies" and new tab called "Configuration" should be created to manage start level. Those name follow the same than Eclipse product. I have another idea too like import JAR org.eclipse.osgi.... coming from the Eclipse Home to the Eclipse project. But before managing that, I must finish this bug. Created attachment 180642 [details]
Patchs for dev-mode + docs + sample explained
This zip contains :
* 3 patchs wich manage dev-mode :
** org.eclipse.rap.warproducts.core_devMode.patch
** org.eclipse.rap.warproducts.core.test_devMode.patch
** org.eclipse.rap.warproducts.ui_devMode.patch
* /sample folder which contains the bridge WTP WEB Applcation explained in this documentation which use warproduct dev-mode.
* ODT and RTF documentation (org.eclipse.rap.warproducts.core - DevMode)
Please read org.eclipse.rap.warproducts.core - DevMode.odt (or rtf) to see in action how dev-mode works. My sample is based on WTP Web Dynamic Web Project. I have explained step by step how create a WTP Web Dynamic Web Project and how transform it to support ServletBridge by using warproduct patched for dev-mode.
In this documentation you will see a lot of comments I have written (marked with BUG[xxx]). We could discuss together and create new bug if you are OK.
Hope you will like my (little) work. It's just a first step for dev-mode.
|