Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352338

Summary: org.eclipse.rap.rwt.osgi does not support Servlet API 3.0
Product: [RT] RAP Reporter: Ralf Zahn <ralf.zahn>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: fr.appel, fwaibel, rsternberg, ruediger.herrmann
Version: 1.5   
Target Milestone: 1.5 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Ralf Zahn CLA 2011-07-18 07:41:28 EDT
Build Identifier: [HEAD]

I'd like to run RWT on WebSphere Application Server V8. The webcontainer provides Servlet API 3.0 (but exports the packages of Servlet API with a version of 2.6.0, which is a bug of WAS).

org.eclipse.rap.rwt.osgi contains a ServletContext Wrapper class that does not implement the methods of the ServletContext interface that were introduced with Servlet API 3.0. The dependencies of the bundle explicitly exclude Servlet API 3.0.

So RAP 1.5 does currently not support Servlet API 3.0, while RAP 1.4 did it. (at least this single bundle)

Reproducible: Always

Steps to Reproduce:
1. Run RWT within a Webcontainer that provides Servlet API 3.0
Comment 1 Ralf Sternberg CLA 2011-07-18 16:43:54 EDT
This makes RAP unusable with modern servlet containers such as Tomcat 7. Since RAP 1.4 is already compatible with servlet 3.0, we'll have to find a way to make rwt.osgi compatible, too.
Comment 2 Frank Appel CLA 2011-07-19 01:34:29 EDT
Would it be a solution to let the wrapper implement the additional 3.0 ServletContext methods? This should not hurt in a 2.6 environment since the 3.0 methods would never be called. We have to have a look at the other wrapper classes also.
Comment 3 Ralf Sternberg CLA 2011-08-14 06:45:20 EDT
Implemented servlet 3.0 interfaces. Unfortunately, this requires a type from a package that has been introduced in 3.0 (javax.servlet.descriptor). Added an optional import for this package to maintain compatibility to 2.5. With servlet 3.0, this package will always be available, as it is exported from the same bundle. But since the single method that refers to this type will never be called, I think it should even work fine when the package is missing at runtime.

rwt.osgi is now compiled against servlet 3.0, and runs fine with servlet 2.5.