Skip to content

Servlet sample not working in Tomcat 10 and 11 #345

@afattahi54

Description

@afattahi54

I tried to run the sample in servlet/java-configuration/hello-security-explicit on Tomcat 10 and Tomcat 11 . But no luck. It seems that SecurityWebApplicationInitializer is not called ( I am using maven to get project libs)

To debug further, I try to print the list of application filters ( by using context.getFilterRegistrations() ) but the spring filters are not shown.

My web.xml:

<web-app
    xmlns="https://jakarta.ee/xml/ns/jakartaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
    version="6.0"
    >
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<listener>
		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
	</listener>
</web-app>

Am I missing something ?! Is this sample suppose to be run on Tomcat whiteout any changes ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions