UseEclipseCreateTomcatEngineeringInstalling the Tomcat plug-in of eclipse may cause version compatibility issues. I did not study it. I copied the plug-in directly from someone else. Use eclipse to create a tomcat project and specify the project name and virtual directory name. For example, test. The generated directory structure is as follows: at the same time, eclipse registers Web Application Test (server in the conf/directory) in Tomcat. add <context>) in XML ). I did not find the command to compile the project, so I wrote a build. xml management project. In fact, when I save the Java file, eclipse will put the compiled class into classes. <Project name = "project name" default = "complie" basedir = ". "> <property name =" srcdir "location =" WEB-INF/src "/> <property name =" builddir "location =" WEB-INF/classes "/> <property name =" splibdir "Location =" WEB-INF/lib "/> <property name =" servlet-apijar "value =" Path of the servlet-api.jar "/> <target name =" init "> <Delete dir = "$ {builddir}"/> <mkdir dir = "$ {builddir}"/> </Target> <target name = "complie" Description = "compile servlet" depends =" init "> <javac srcdir =" $ {srcdir} "destdir =" $ {builddir} "> <classpath> <pathelement Path =" $ {builddir }; "/> <pathelement Path =" $ {servlet-apijar} "/> <fileset dir =" $ {splibdir} "> <include name = "*. jar "/> </fileset> </classpath> </javac> </Target> </Project>
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.