This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting JAVA_HOME

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I came across the following excerpts :

After we have extracted Tomcat, the next step is to set the JAVA_HOME(D:\jdk1.3) and TOMCAT_HOME environment variables. These variables are used to compile JSPs and run Tomcat, respectively.


Why is it that JAVA_HOME is used for compiling JSPs !!!

Thnx in advance
 
Mat Williams
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

JAVA_HOME points to an istallation of the jdk so that JSPs can be converted into servlets. However, my memory of installing tomcat was that it created the JAVA_HOME environment variable for you, so just try creating a jsp and running it to see what happens, if you have problems post back and I can let you know how to set it up.

Mat
 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mat,
I guess you have misunderstood my question.I am able to run JSPs successfully. What i am actually trying to ask is that is (D:\jdk1.3) used for only compiling JSPs and not servlets!!!

N C
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP (that is not already precompiled) must be compiled on the fly by the container when a request comes in for the first time. Therefore, the container needs to know where your jdk is installed.

Servlets are already compiled by you, the developer, before putting them in the appropriate WEB-INF directory. There is no need for the container to compile them again.

JSPs are the only thing Tomcat is compiling...
 
MI Mohammed
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The short answer is a capital YES. JSP are compiled.
Remember, JSPs are servlet under the hood. But you don't have to
worry about how they are created or converted to servlets. The container
does it for you (but on on the first request for the jsp).
So, the container must know where the jsdk resides on the system, for it to
use the javac. for the runing of java code, what do you think the container
uses ?

SCJP 1.4 SCJA
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic