Search code examples
spring-bootdeploymentwebsphere

webapp - SRVE0278E: Error while adding servlet mapping --> /*


I've set the value

<jsp-attribute name="fileServingEnabled" value="false"/>

according to IBM Support discussion.

But also I'm getting this error:

webapp - SRVE0278E: Error while adding servlet mapping --> /*.

I've included the most part of my code required in my previous question Running Spring Boot Application on WebSphere 9

I'm using Spring Boot 1.4.3.RELEASE and websphere 9.0.0.1 traditional.

Any help is highly appreciated.


Solution

  • Check this page Configuring JSP engine parameters. It should be specified via:

     <enable-file-serving value="false"/>
    

    not <jsp-attribute> element.

    Here is sample from documentation:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-ext
       xmlns="http://websphere.ibm.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
          version="1.0">
    
       <default-error-page uri="error.jsp"/>
       <jsp-attribute name="useThreadTagPool" value="true" />
       <jsp-attribute name="verbose" value="false" />
       <jsp-attribute name="deprecation" value="false" />
       <jsp-attribute name="reloadEnabled" value="true" />
       <jsp-attribute name="reloadInterval" value="5" />
       <jsp-attribute name="keepgenerated"  value="true" />
       <jsp-attribute name="trackDependencies" value="true" />
       <reload-interval value="9"/>
       <auto-encode-requests value="true"/>
       <auto-encode-responses value="false"/>
       <enable-directory-browsing value="false"/>
       <enable-file-serving value="false"/>
       <pre-compile-jsps value="false"/>
       <enable-reloading value="true"/>
       <enable-serving-servlets-by-class-name value="true"/>
    </web-ext>