-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
JetBrains releases IntelliJ IDEA 2025.1.1, bringing multiple bug fixes and improvements
By David Uzondu,
- jetbrains
- intellij idea
- (and 6 more)
- 0 replies
- 0 views
-
- 14 replies
- 0 views
-
High Performance with Java ($33.99 Value) free eBook download
By News Staff,
- ebook offer
- sponsored
- (and 2 more)
- 0 replies
- 4 views
-
- 0 replies
- 8 views
-
Java and Algorithmic Thinking for the Complete Beginner ($9.99 Value) free download
By News Staff,
- ebook offer
- sponsored
- (and 1 more)
- 0 replies
- 4 views
-
Question
tisho64
I have a Java Spring Boot project that uses React as a front end. In order to allow web crawlers to index the site I (with the help of examples found by googling) decided to implement a HandlerInterceptorAdapter where I would match the requested URI and redirect to my default controller if needed. I got stuck very quickly though. This is my entire interceptor as of now:
As you can see I am trying to make it compile at least. The second argument of preHandle() expects HttpServletResponse which needs to be imported from org.apache.catalina.servlet4preview.http. The one from javax.servlet.http doesn't count. Right now HttpServletResponse doesn't exist inside the catalina package.
To make things worse there is not logical connections between the import statements and the artifact ids. I can only guess. I have in project's pom.xml dependencies for tomcat-servlet-api and org.apache.catalina. Catalina cannot even be resolved (even though I have https://mvnrepository.com set as a secondary repository)
P.S. This project is to be deployed to a Tomcat server, so I need to use Catalina/Tomcat variants of the libraries
Link to comment
https://www.neowin.net/forum/topic/1393373-httpservletresponse-is-missing/Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now