This topic applies to WebSphere Application Server Liberty V8.5.5.9 and earlier. For the latest Liberty topics, see the WebSphere Application Server Liberty documentation.

Configuring Liberty for Servlet 3.1

You can configure Liberty for the Servlet 3.1 feature, which provides full support for the Servlet 3.1 specification.

About this task

To configure a Liberty server to run an application that is enabled for Servlet 3.1, you must set the <servlet-3.1> feature.

Procedure

Update the server.xml file to add the <servlet-3.1> feature. For example:
<featureManager>
	<feature>servlet-3.1</feature>
</featureManager>
Important:
  • The websocket-1.0 and websocket-1.1 features require the servlet-3.1 feature and as a result, configuring the websocket-1.0 or websocket-1.1 feature causes the servlet-3.1 feature to load.
  • You can use Java™ EE 6 features, such as jsp-2.2 and jsf-2.0, with the servlet-3.1 feature. However, you cannot use a Java EE 6 feature to exploit Servlet 3.1 features.
  • You can choose between the Servlet 3.0 and Servlet 3.1 feature implementations for each server instance, but you must consider any behavior changes. If required behavior is contained only in the Servlet 3.1 feature, then you must use the Servlet 3.1 feature. If an existing application would be adversely impacted by behavior changes in the Servlet 3.1 feature, then use the Servlet 3.0 feature to preserve the existing behavior for that application.
  • It is not possible to use both the Servlet 3.0 and Servlet 3.1 features in the same Liberty server. If both features are configured, it will produce an error. Read the Servlet 3.1 behavior changes topic to learn about changes from Servlet 3.0 and Servlet 3.1.

Results

The Servlet-3.1 feature is enabled and loads in the Liberty server at run time.

Icon that indicates the type of topic Task topic



Timestamp icon Last updated: Tuesday, 12 December 2017
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-libcore-mp&topic=twlp_config_servlet31
File name: twlp_config_servlet31.html