How can JRE be enough for Tomcat to handle JSP files? Why not JDK?
Can someone clearly describe how JR开发者_JAVA百科E handles the JSP files which contain pure JAVA codes? I know that byte codes of JSP files are not placed in the WAR file. It consists of compiled CLASS files and plain JSP files.
It says in Tomcat's RUNNING.txt "Apache Tomcat 6.0 requires the Java 2 Standard Edition Runtime Environment (JRE) version 5.0 or later."
Please kill my pain.
Tomcat bundles a copy of the Eclipse compiler, rather than using the JDK javac compiler. It's faster (or, at least, it used to be), has less restrictive licensing, and removes the dependency on the full JDK.
http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
The Eclipse JDT Java compiler is now used to perform JSP java source code compilation
This suggests that prior to Tomcat 5.5, the full JDK was required.
Tomcat is a web-container to get the JSP and Servlets run. Tomcat implements Sun's Servlet and JSP specifications. Tomcat can run the compiled Java class files. To accomplish that purpose only it needs JRE, nothing more than that.
Do you know? JSPs will also be converted into Servlet code...
Tomcat comprises of Servlet and JSP execution engines called Catalina (serves as a Servlet container) and Jasper (serves as a JSP container), which converts the JSP code to Servlet code and passes it to the Catalina container.
精彩评论