Tomcat transfer deployment from windows to linux-Linux Enterprise Application-Linux server application information. For details, see the following section. In the past two days, the j2ee project in windows has been transferred to linux for debugging, but there are still many problems.
There are two conclusions:
I. The first is to let developers the most headache classpath problem, copy the project to linux, first run the java program, be sure to note that the project directory, with "java-classpath lucene-core-2.0.jar: commons-lang.jar :. /bin helloworld "to run. Note that the jar packages are separated by": ". If the compiled helloworld. if the class is put in the bin under the current directory of the project, you also need to write it as classpath so that the Java Virtual Machine will find the compiled helloworld under the bin directory. class.
II. If the tomcat server runs OK in windows and is deployed in linux, the first step is to clear the compiled directory of your web project? In windows, the compiled classes, jsp, html, and so on of the J2EE project are put under the webapp directory named after your project name under the tomcat directory. The subsequent steps are as follows:
A. Copy the directory to the webapp directory of the tomcat server in linux, and put the jar package you want to use in its common directory so that it can find the external jar package you want to use.
B. In addition, note that if you use a relative path in your program to read files, you must remember to run the tomcat web page in the bin directory. The file to be read must be placed in bin. Otherwise, use the absolute path.
C. When the amount of data to be transmitted by jsp and serlet is large, the virtual machine memory overflow may be reported. java tomcat OutOfMemoryError heap space. In this case, you need to set the parameters of the VM running tomcat, and set tomcat/bin/catalina. sh: Add the following statement: "JAVA_OPTS = '-Xms512m-xmx1024m'" to set the minimum and maximum memory size used by the VM during tomcat running.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service