illegal url redirect
We have an application, designed back in 2000’s based on a Java Applet-Servlet communication. The Applet code was deployed on the Nginx HTTP layer, while the Servlet is running on a Tomcat (on port 80). Couple of days back the application stopped working, generating an error in Java console like the following:
java.lang.SecurityException: illegal URL redirect
This error is actually a CORS error, while the Servlet is trying to load the applet which resides on a different host (even is the same host, but different port)
What we did to solve this issue was to move the Java Applet code on Tomcat, as a static content. Please follow this link to read how to deploy static content on Tomcat.
UPDATE: After all these, I found that the solution was not working for some users. Very few, but exactly the customers. I needed to delete the cache of Java Runtime Environment (JRE)
Our solution was based on the following StackOverflow post.