Because the company's project requires the participation of j2ee, I have been studying j2ee intensively in the past few days.
It’s rare that I have some free time today, so I would like to summarize my work and study these days as follows:
In application development based on Java WEB (j2ee), the most popular environment currently is MTEC (mysql, tomcat, eclipse, cvs)
I will focus on introducing some problems encountered in the configuration of jdk and tomcat and their solutions:
1. jdk configuration:
1. Set the JAVA_HOME variable to the home directory of java c:jdk1.5.0_06:
$JAVA_HOME=c:jdk1.5.0_06; //jdk installation path
2. Add the java bin directory path c:jdk1.5.0_06bin to the PATH environment variable
$PATH=c:jdk1.5.0_06bin;
Test the java environment: Enter the command prompt (Start->Run->Enter cmd) and enter the command java -version
Check whether the version is correct. Enter javac -help to check whether the prompt is correct. If the prompt is "not an internal or external command, nor an operable program or batch file", it means that the path is not set properly.
2. tomcat configuration:
Set environment variables: $TOMCAT_HOME=c:tomcat5.5; //Tomcat path
to install tomcat. The default port is 8080, if you need to change it to something else, (such as 80, etc.)
Open the file conf/server.xml and find
<Connector port=”8080″ maxHttpHeaderSize=”8192″
maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”false” redirectPort=”8443″ acceptCount=”100″
connectionTimeout=”20000″ disableUploadTimeout=”true” />
Just change 8080 to the port you need.