Adding additional servlets to Orion server [message #1251839] |
Thu, 20 February 2014 11:59  |
Eclipse User |
|
|
|
Moved from orion-dev:
Quote:Dear Mark Macdonald ,
You have told the below procedure is applicable for local desktop eclipse IDE . But orion web based IDE is it applicable ? . Because I have tried for a couple of week which is not working to me .
org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.orion.server.configurator was unable to load class org.eclipse.orion.server.zide.ZideServlet
<extension point="org.eclipse.equinox.http.registry.servlets">
<servlet
alias="/zide"
class="org.eclipse.orion.server.zide.ZideServlet">
</servlet>
</extension>
But it is working in , If i put in this class
<extension point="org.eclipse.equinox.http.registry.servlets">
<servlet
alias="/zide"
class="org.eclipse.orion.server.npm.ZideServlet">
</servlet>
</extension>
Regards by,
K.Vinoth kumar
Quote:---- On Thu, 20 Feb 2014 20:04:51 +0530 Mark Macdonald <mamacdon@xxxxxxxxx> wrote ----
The Orion server defines its servlet path mappings in the following file: bundles/org.eclipse.orion.server.configurator/plugin.xml
A servlet mapping looks something like this:
<extension point="org.eclipse.equinox.http.registry.servlets">
<servlet
alias="/npm"
class="org.eclipse.orion.server.npm.NpmServlet">
</servlet>
</extension>
If you want to get started quickly, you can just edit that file and re-launch your server. A better approach would be to add a new OSGi bundle to your server, that provides your servlet's functionality. Your new bundle can contain a plugin.xml file similar to Orion's, that defines your servlet path mappings.
Consult the Equinox documentation for more information. Here is a starting point: http://eclipse.org/equinox/server/http_writing_application.php
If you have more questions, the Orion Forum is a good place to ask.
|
|
|
Re: Adding additional servlets to Orion server [message #1251952 is a reply to message #1251839] |
Thu, 20 February 2014 14:37  |
Eclipse User |
|
|
|
Where is the ZideServlet class defined? If it is in a new bundle, you must add an entry for your new bundle to the server feature (features/org.eclipse.orion.server-feature/feature.xml) to ensure that the bundle is activated at runtime.
Because you are trying to reference ZideServlet from the plugin.xml file of the org.eclipse.orion.server.configurator bundle, you must also add a dependency from org.eclipse.orion.server.configurator to your new bundle. This can be done by adding an entry to the "Require-Bundle" section of bundles/org.eclipse.orion.server.configurator/META-INF/MANIFEST.MF.
|
|
|
Powered by
FUDForum. Page generated in 0.04686 seconds