简体   繁体   中英

How can JRE be enough for Tomcat to handle JSP files? Why not JDK?

Can someone clearly describe how JRE 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM