Issue
Recently I upgraded my application to Tomcat 9 and Java 8 and deployed my war files. When I launch my application I'm getting errors like,
An error occurred at line: [3] in the jsp file: [/app/myPage.jsp]
The method URLDecode(String) is undefined for the type RequestUtil
1: </script>
2: <%
3: String fromPage = org.apache.catalina.util.RequestUtil.URLDecode( "redirect" );
in my lib path catalina.jar has the method. Please guide me on what is missing.
Solution
The functionality has been removed in version 9: https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/catalina/util/RequestUtil.html
Try UDecoder from Tomcat 9: https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/tomcat/util/buf/UDecoder.html
or Java 8's built-in decoder: https://docs.oracle.com/javase/8/docs/api/java/net/URLDecoder.html
Answered By - KevinB