|
Setting up the JSP environment
Before setting up the JSP environment,you must make sure you have the JDK.
Download the latest JDK (with or without IDE) from the following URL:
http://java.sun.com/javase/downloads/index.jsp
For Windows,the complete download is about 50 MB.
Run through the setup.
One of the main problems new Java developers have is setting the PATH and CLASSPATH.
For Windows 95/98/ME you edit the AUTOEXEC.BAT file with the new PATH and CLASSPATH
settings and reboot your machine.
For Windows 2000/XP you edit the environment variables.
(Control Panel -> System -> Environment Variables).
See below. Read the installation instructions properly as it may change with future releases. What you do is add the location of java's bin folder to the Path variable and the classes you want in the CLASSPATH variable.

Both of these changes are described in the Java installation instructions.
Download the JSP environment
You can download JSP environments from the web. http://java.sun.com/products/jsp/index.jsp
The preferred option is to download the Tomcat (approximately 7 to 10MB depending on the extras chosen). Tomcat is a free open source JSP and Servlet engine,developed by Apache. Instructions to download Tomcat are given below.
http://tomcat.apache.org/
For Tomcat setup
To download Tomcat (current version 5.),go to the following URL:
http://tomcat.apache.org/download-55.cgi
Unzip the file into a directory and set an environment variable TOMCAT_HOME to your main Tomcat directory:
For example,
set TOMCAT_HOME=c:\tomcat
To start the server change to the tomcat\bin directory and type:
startup
Open a web browser and in the address box type:
http://localhost:8080/ - this displays the example page.
Place any new JSP files in the "webapps" directory under your installed Tomcat directory.
For example,to run "myfirst.jsp" file,copy the file into the "webapps/ROOT" directory and then open a browser to the address:
http://localhost:8080/myfirst.jsp
This will show you the executed JSP file.
CONGRATULATIONS - YOUR JSP and SERVLET ENVIRONMENT IS NOW SETUP!
|