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

Software Engineer and Wheel of Fortune Expert If this article helped you, please consider buying me a book.

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