cancel
Showing results for 
Search instead for 
Did you mean: 

WebAS not compliant to Servlet API 2.4

Former Member
0 Kudos

In the specification of the Servlet API version 2.4 the method contextInitialized() in the interface ServletContextListener is defined as follows:

Notification that the web application is ready to process requests. All ServletContextListeners are notified of context initialisation before any servlet in the web application is initialized.

However, through logging it can be observed that in the WebAS Java implementation of the Servlet API a ServletContextListener is notified of contextInitialized() AFTER some sevlets have been initialized.

I presume the reason is that WebAS Java implements the version 2.3 of the specification, which doesn't define the order of events quite so well.

Question 1. Is there a workaround, i.e. how can one get a ServletContextEvent BEFORE any servlet is initialized?

Question 2. Does SAP plan to support the version 2.4 of the Servlet API? When can we expect this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Martin,

Web AS 6.40 is J2EE 1.3 compliant, hence servlet 2.3 specification is implemented. Yes, J2EE 1.4 (hence, servlet 2.4) support is planned with the next release of NetWeaver, which is scheduled for the second half of the next year.

About the workaround question, I'd try to bring some developers into the discussion.

Regards,

Ivo

Answers (1)

Answers (1)

0 Kudos

Hi Martin,

Ivo is right. Web AS 6.40 is J2EE 1.3 compliant and implements Servlet 2.3 specification. In Servlet 2.3 API it’s not explicitly said that the contextInitialized() method in ServletContextListener interface should be called before any servlet or filter is initialized. In this release the ServletContextListeners are notified of context initialization after servlet and filter initialization and thus informing them that web application is ready to process requests.

Unfortunately there is no workaround as it is implementation dependent, and of course of reasons for backwards compatibility such changes could not be done.

What concerns your second question is that the J2EE 1.4 (hence, servlet 2.4 API) support is planned for the next release of the Web AS. In that release the contextInitialized event will be thrown before any servlet or filter is initialized.

Regards,

Diyan

Former Member
0 Kudos

Hello,

just to be sure, does SAP Netweaver Web Application Server 7.0 support Servlet API 2.4???

Thanks for helping,

Tanguy Mezzano

angela_farrell
Explorer
0 Kudos

We have EP 7.0 (WAS 7.0) and it only supports 2.3 (per help.sap.com). If there is an update or correction, please advise, we require 2.4 support as well.

Kind Regards

A. Farrell