Search code examples
jboss7.xwildflyeclipse-rap

javax.servlet Missing For WAR


I build a WAR for an Eclipse RAP application using Maven. Now the documentation states:

Make sure that the WAR does not contain the javax.servlet bundle. In the plug-in manifest the javax.servlet must be listed in the Import-Package section, not in Require-Bundle.

My WAR, on the other hand displays the following error message when deployed on a JBoss (I tried version 7 and 8):

BundleException: The bundle "org.eclipse.rap.rwt.osgi_2.2.0.20131126-1551 [42]" could not be resolved. 
Reason: Missing Constraint: Import-Package: javax.servlet; version="[2.5.0,4.0.0)"

Where should the import javax.servlet come from? How do I put it there to fix the problem?


Solution

  • Evidently the correct answer is: Just put the javax.servlet into the WAR, no matter what the documentation says.