views:

121

answers:

3

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.

+15  A: 

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.

skaffman
A: 

Thanks skaffman. I think I missed 5.5 documents. But earlier versions need JDK, don't they?

vhtmg108
Please post such things as comments to an answer, rather than as a new answer.
skaffman
You are right. I looked for a comment/reply button under your post; but didn't find. Magically this post has the button.
vhtmg108
@vhtmg108: at 50 rep, you can comment on anyone's post. you can always comment on your own posts.
mmsmatt
You can also comment in reply to others peoples posts in reply to your own question. However, StackOverflow thinks that there are two vhtmg108 users.
R. Bemrose
@vhtmg108: you need to **register** your account so that you can reuse it on next logins.
BalusC
A: 

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.

venJava
None of which answers the question. JSPs are compiled into `.java` source, which then needs to be further compiled into `.class` files. The JRE cannot do that, which was the gist of the question.
skaffman