Current request is not of type HttpServletRequest

Ran into this error this week

There was an unexpected error (type=Internal Server Error, status=500). Current request is not of type [org.apache.catalina.servlet4preview.http.HttpServletRequest]: ServletWebRequest: uri=/my/url/

Make sure you imported the correct HttpServletRequest import. I wanted import javax.servlet.http.HttpServletRequest;

Matt Busche's Picture

About Matt Busche

Matt is a developer at Nationwide Insurance and Freelance Consultant.

Des Moines, IA https://www.matthewbusche.com