Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Gemini/Web"

m (How to run in debug mode?)
(Trying out Gemini Web)
Line 9: Line 9:
 
2. [http://www.eclipse.org/gemini/web/download Download] Gemini Web and unzip it to ~/gemini-web-test/gemini-web.  
 
2. [http://www.eclipse.org/gemini/web/download Download] Gemini Web and unzip it to ~/gemini-web-test/gemini-web.  
  
3. Configure Equinox by creating a directory ~/gemini-web-test/configuration and create a config.ini file in the configuration directory. An example which works with '''1.1.0.M03-incubation''' is available (in zipped form) [http://wiki.eclipse.org/images/5/5e/Config.ini.zip here]. Essentially this file ensures that the dependencies of Gemini Web, which come in the dep directory, are installed and then the Gemini Web bundles are installed and started.  
+
3. Configure Equinox by creating a directory ~/gemini-web-test/configuration and create a config.ini file in the configuration directory. An example which works with '''1.1.0.M04-incubation''' is available (in zipped form) [http://wiki.eclipse.org/images/5/5e/Config.ini.zip here]. Essentially this file ensures that the dependencies of Gemini Web, which come in the dep directory, are installed and then the Gemini Web bundles are installed and started.  
  
 
4. Start Equinox as follows:  
 
4. Start Equinox as follows:  
Line 15: Line 15:
 
  java -jar org.eclipse.osgi_3.6.0.v20100517.jar -console
 
  java -jar org.eclipse.osgi_3.6.0.v20100517.jar -console
  
5. You can then install WAR files and web bundles using the install command from the console. Refer to the [http://www.eclipse.org/gemini/web/documentation documentation] for more information.  
+
5. You can then install WAR files and web bundles using the install command from the console. Refer to the [http://www.eclipse.org/gemini/web/documentation documentation] for more information.
  
 
== Set as a Target Platform in PDE ==
 
== Set as a Target Platform in PDE ==

Revision as of 09:24, 9 September 2010

Gemini Web is a subproject of the Gemini project.

Gemini Web is a sister project of Virgo. Please refer to the Virgo wiki for salient information.

Trying out Gemini Web

1. Download the Equinox JAR, for example org.eclipse.osgi_3.6.0.v20100517.jar, and move it to a suitable directory (e.g. ~/gemini-web-test). On the Download page first choose the desired Release or Build, then download the JAR from the Framework section.

2. Download Gemini Web and unzip it to ~/gemini-web-test/gemini-web.

3. Configure Equinox by creating a directory ~/gemini-web-test/configuration and create a config.ini file in the configuration directory. An example which works with 1.1.0.M04-incubation is available (in zipped form) here. Essentially this file ensures that the dependencies of Gemini Web, which come in the dep directory, are installed and then the Gemini Web bundles are installed and started.

4. Start Equinox as follows:

java -jar org.eclipse.osgi_3.6.0.v20100517.jar -console

5. You can then install WAR files and web bundles using the install command from the console. Refer to the documentation for more information.

Set as a Target Platform in PDE

The following steps enable you to develop Web Application Bundles that compile against the libraries of the Gemini Web container by using the existing Plug-in Development Environment (PDE) tooling in Eclipse.

  1. Open Window > Preferences from the main menu in the Eclipse IDE.
  2. Navigate to the Plug-in Development > Target Platform preferences page.
  3. Click the Add... button.
  4. Choose Nothing: start with an empty target definition and click Next >
  5. Give a Name for the new target definition (like "Gemini Web").
  6. Make sure the Locations tab is the active one and click the Add... button.
  7. Choose Directory and press the Next > button.
  8. Browse to the ~/gemini-web-test folder and click the Finish button.
  9. Repeat steps 6-8 to add the ~/gemini-web-test/gemini-web and ~/gemini-web-test/gemini-web/dep folders to the target definition.
  10. Click the Finish button to close the New Target Definition wizard.
  11. Select the newly created target definition and click the OK button to activate it for you PDE environment.

Run as OSGi Framework from the Eclipse IDE

The following steps enable you to deploy and run the Web Application Bundles in your Eclipse workspace on the Gemini Web container.

OSGi Framework run configuration
  1. Make sure you have set the Gemini Web container as a target platform as described in the previous section.
  2. Open Run > Run Configurations... from the main menu of the Eclipse IDE.
  3. Navigate to the OSGi Framework category.
  4. Right-click > New.
  5. Give a Name for you run configuration (like "Gemini Web").
  6. Open the Bundles tab.
  7. Make sure all of the bundles under the Target Platform node are selected.
  8. Select the bundles from the Workspace you want to deploy in the Gemini Web container.
  9. Click the Run button.

You will see some logs dumped in the Console view. After a second the Gemini Web container is started and the Web Application Bundles from the workspace are deployed. You can now call you application from the browser using URLs like:

http://localhost:8080/<context-root>/...

The above steps are needed only for the first run of Gemini Web. Any subsequent runs can be executed much simpler:

  • Right-click your Web Application Bundle project and call Run As > OSGi Framework. That's all.

How to stop Gemini Web?

The safest way to stop Gemini Web is to type close in the Console view and hit Enter.

You need to stop any old instance of Gemini Web before starting it again. Otherwise, the new instance won't start correctly, because the old one still occupies the http port (and, perhaps, other system resources).

How to run in debug mode?

Running in debug mode is done simply by:

  • Right-click your Web Application Bundle project and call Debug As > OSGi Framework. That's all.

You will get all debug features (including hot code replace) from JDT and PDE for free.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.