我们打开tomcat的D:\Program_Files\apache-tomcat-8.0.32\work\Catalina\localhost\venus\org\apache\jsp,
当我们访问过页面后会发现login.jsp会生成两个文件login_jsp.class和login_jsp.java
我们打开java文件其中有这段代码
out.write("\r\n");
out.write(""-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
out.write("\r\n");
out.write("\t
\r\n");out.write("\t\t\r\n");
out.write("\t\t
百度一下\r\n");out.write("\t\r\n");
out.write("\t
\r\n");out.write("\t\t
\r\n");out.write("\t\t\t\r\n");
out.write("\t\t\t\r\n");
out.write("\t\t\t提交\r\n");
out.write("\t\t
\r\n");out.write("\t\t\r\n");
out.write("\t\r\n");
out.write("");
发现原理JSP里的内容变成了字符串
JSP文件是在一个类中的