Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Replacing javax.servlet Dependency
Replacing javax.servlet Dependency [message #1004495] Wed, 23 January 2013 10:55 Go to next message
Franz-Stefan Mising name is currently offline Franz-Stefan Mising name
Messages: 12
Registered: December 2010
Junior Member
Dear Tycho-Team, Dear RAP-Team,

we use Tycho to automatically assemble a .war file of our RAP [1] project, and I want to know whether it is possible to replace the javax.servlet dependency from Glassfish with an alternative implementation.
As I'm not sure if the Tycho developers or the RAP developers are the right audience to ask, I'm sending this to both communities.

---------------
Setup:
---------------
Our setup is analog to the ones in org.eclipse.rap.examples.build [2], with a bundle project, a feature project, a product project, a two-staged parent pom [3, 4], and eclipse-juno as p2 repository.
The .war file is built correctly and our RAP application runs fine on a jetty server.

In my bundle project MANIFEST.MF, I have 'Require-Bundle: org.eclipse.rap.ui' and 'Import-Package: javax.servlet;version="2.4.0", javax.servlet.http;version="2.4.0"' entries.
Using 'mvn dependency:tree' on this bundle project, I see the following dependency entry:
[INFO] +- p2.eclipse-plugin:javax.servlet:jar:3.0.0.v201112011016:system
Looking at javax.servlet-3.0.0.v201112011016.jar in my m2 repository folder, its 'about.html' says: "The plug-in includes software developed by Sun as part of the Glassfish project."
As far as I understand, this jar file is automatically downloaded by Tycho from the eclipse-juno p2 repository.

I don't know if that's relevant, but the feature/product projects do not have such a javax.servlet dependency; they have the following servlet dependency entries (instead):
[INFO] +- p2.eclipse-plugin:org.eclipse.equinox.http.servlet:jar:1.1.300.v20120522-1841:system
[INFO] +- p2.eclipse-plugin:org.eclipse.equinox.http.servletbridge:jar:1.0.300.v20120522-2049:system
[INFO] +- p2.eclipse-plugin:org.eclipse.equinox.servletbridge.extensionbundle:jar:1.2.100.v20120522-2049:system

---------------
Question:
---------------
Because of open-source licensing issues, I need to substitute the javax.servlet from Sun's/Oracle's Glassfish with an implementation from another provider.
Can anybody tell me whether this is possible, and if yes, how it can be done?

Thank you already in advance.

[1] http://eclipse.org/rap/
[2] https://github.com/eclipse/rap/tree/master/releng/org.eclipse.rap.examples.build
[3] https://github.com/eclipse/rap/blob/master/releng/org.eclipse.rap.examples.build/parent/pom.xml
[4] https://github.com/eclipse/rap/blob/master/releng/org.eclipse.rap.examples.build/parent/parent/pom.xml

Best Regards,
Franz-Stefan
Re: Replacing javax.servlet Dependency [message #1005349 is a reply to message #1004495] Fri, 25 January 2013 00:40 Go to previous message
Chris Fairhall is currently offline Chris Fairhall
Messages: 100
Registered: February 2011
Senior Member
What are the licensing issues? You don't need to distribute the Glassfish or any other implementation. All you're doing is declaring a dependency on an API = "javax.servlet".
When you build your RAP application into a WAR file, the servlet jar is not included.
You should never bundle a servlet implementation jar with your product unless your product is a servlet container.
Previous Topic:RWT.getApplicationContext() in non-UI thread
Next Topic:Java applet in browser widget covers modal dialogs
Goto Forum:
  


Current Time: Tue Oct 21 13:42:46 GMT 2014

Powered by FUDForum. Page generated in 0.06717 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software