smith.norton
05-25-2006, 08:45 AM
When I access the following JSP page, it runs well.
<html>
<head>
<title>
hello
</title>
<body>
<% out.println("Check this: <% hello > End"); %>
</body>
</html>
When I check the $CATALINA_HOME/localhost/_/org/apache/jsp/exp folder for the java-servlet code, i find the following out.write and out.println statements.
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("hello\r\n");
out.write("</title>\r\n");
out.write("<body>\r\n");
out.println("Check this: <% hello > End");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>");
This is all fine. But when I try to access this JSP page, I get error.
<html>
<head>
<title>
hello
</title>
<body>
<% out.println("Check this: <% hello %> End"); %>
</body>
</html>
The culprit can be found in the following Java-Servlet code.
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("hello\r\n");
out.write("</title>\r\n");
out.write("<body>\r\n");
out.println("Check this: <% hello
out.write(" End\"); %>\r\n");
out.write("</body>\r\n");
out.write("</html>");
Am I making a mistake or is it a bug in Tomcat? I am using Tomcat 5.5.6.
<html>
<head>
<title>
hello
</title>
<body>
<% out.println("Check this: <% hello > End"); %>
</body>
</html>
When I check the $CATALINA_HOME/localhost/_/org/apache/jsp/exp folder for the java-servlet code, i find the following out.write and out.println statements.
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("hello\r\n");
out.write("</title>\r\n");
out.write("<body>\r\n");
out.println("Check this: <% hello > End");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>");
This is all fine. But when I try to access this JSP page, I get error.
<html>
<head>
<title>
hello
</title>
<body>
<% out.println("Check this: <% hello %> End"); %>
</body>
</html>
The culprit can be found in the following Java-Servlet code.
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>\r\n");
out.write("hello\r\n");
out.write("</title>\r\n");
out.write("<body>\r\n");
out.println("Check this: <% hello
out.write(" End\"); %>\r\n");
out.write("</body>\r\n");
out.write("</html>");
Am I making a mistake or is it a bug in Tomcat? I am using Tomcat 5.5.6.