Incomplete translation, combined with Google, certain subjectivity, may also be wrong, original content address: https://www.tutorialspoint.com/jsp/jsp_environment_setup.htm
The "note" looks a bit old. Best to refer to the latest tutorials on the web
A development environment is where you develop, test, and run programs.
This tutorial will guide you through building a JSP development environment, which includes the following steps-
Configuring the Java Development Kit (JDK)
This step involves downloading the Java software Development Kit (SDK) and configuring the PATH environment variable.
You can download Sdk−java SE Downloads from the Oracle Java site.
After you download the JDK, follow the instructions that you specified to install and configure. Finally, set Path and Java_home environment variables point to directories that contain Java and Javac.
If you are using Windows and C:\jdk1.5.0_20 you have installed the SDK in the C:\autoexec.bat Add the following line to the file .
Set PATH = C:\jdk1.5.0_20\bin;%path%set Java_home = C:\jdk1.5.0_20
"Comments" may be possible to write a batch process to complete the configuration.
or, in Windows nt/2000/xp You can also right-click on the My Computer " , select the Properties " , and then Select Advanced " , and then Select environment variable " . Then, update the path value, and then press the OK button.
On Unix (solaris,linux, etc.), if the SDK is installed on the in/usr/local/jdk1.5.0_20 , and C shell is used, the following is placed in the . CSHRC file.
Setenv Path/usr/local/jdk1.5.0_20/bin: $PATHsetenv java_home/usr/local/jdk1.5.0_20
or, if you use like Borland Jbuilder,eclipse,intellij idea or Sun One Studio such a Integrated Development Environment (IDE) , you can compile and run a simple program to confirm that the IDE knows where to install Java.
Configure the Web server: Tomcat
There are many Web servers on the market that support JavaServer pages and Servlets. Some Web servers can be downloaded for free, and Tomcat is one of them.
Apache Tomcat is an open source software that supports JavaServer pages and servlet technology, can be used as a standalone server for testing JSPs and Servlets, and can be integrated with Apache Web servers. Here are the steps to set up tomcat on your PC-
You can start Tomcat by executing the following command on Windows-
%catalina_home%\bin\startup. or C:\apache-Tomcat-5.5. \b in\startup. Bat
You can start Tomcat by executing the following command on UNIX (solaris,linux, etc.):
$CATALINA _home/bin/startup. or/usr/local/Apache-Tomcat-5.5. /Bin/startup. SH
After successful startup, you can access the default Web application included with Tomcat via http://localhost:8080/ .
For more information about configuring and running Tomcat, see the documentation in this document and the Tomcat Web site- https://tomcat.apache.org/ .
You can stop Tomcat by executing the following command on Windows-
%catalina_home%\bin\shutdownorC:\apache-Tomcat- 5.5. \b in\shutdown
You can stop Tomcat by executing the following command on UNIX (solaris,linux, etc.)-
$CATALINA _home/bin/shutdown. SHor/usr/local/Apache-Tomcat-5.5. /bin/shutdown. SH
Configure CLASSPATH
Since the servlet is not part of the Java SE, you must identify the path to the Servlet class.
If you are using Windows, you need to place the following C:\autoexec.bat file.
Set CATALINA = C:\apache-tomcat-5.5.29set CLASSPATH =%catalina%\common\lib\jsp-api.jar;%classpath%
or, in Windows nt/2000/xp You can also right-click on the My Computer , select Properties , and then Select Advanced , and then select Environment Variables . Then, update the CLASSPATH value and press the OK button.
on Unix (solaris,linux, etc.), if you use C shell, you will put the following line into . CSHRC file.
setenv CATALINA =/usr/local/apache-tomcat-5.5.29setenv CLASSPATH $CATALINA/common/lib/jsp-api.jar: $CLASSPATH
JSP note 03--Environment Construction (turn)