org.apache.jasper.JasperException: /TestBean.jsp(20,10) Attribute value request.getParameter('userName') is quoted with ' which must be escaped when used within the value
You are, in effect, coding a string in the form of "this is "a" string" and the inner quotes are causing the lexical scanner to become confused because there's no unambiguous way to know that they are inner quotes instead of terminal quotes. As in "this is" + a + "string".
You need to disambiguate the text, and you should be able to do that using escapes. In Java, that would be "this is \"a\" string".
An IDE is no substitute for an Intelligent Developer.