Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servlet sample not working in Tomcat 10 and 11 #345

Open
afattahi54 opened this issue Feb 1, 2025 · 0 comments
Open

Servlet sample not working in Tomcat 10 and 11 #345

afattahi54 opened this issue Feb 1, 2025 · 0 comments

Comments

@afattahi54
Copy link

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant