Development of web applications using eclipse install configuration more complicated, according to their own learning experience, I will use eclipse + lomboz + tomcat specific installation and configuration process of developing web applications written in the hope of a need to learn a friend to help, also considered their own study notes it.
1. Installation Preparation:
eclipse Downloads: http://www.eclipse.org/downloads/
JDK installer download: http://www.sun.com/download/index.jsp?cat=Java% 20% 26% 20Technologies & tab = 3 & subcat = Java
Tomcat installation program downloads: http://tomcat.apache.org/
Tomcat plug-in download: http://www.sysdeo.com/sysdeo/content/download/669/7716/file/tomcatPluginV32beta2.zip
lomboz plug-in download: http://lomboz.objectweb.org/downloads/download.php can select the version you need lomboz, the latest version is 3.3 Download Lomboz with Prerequisites Installation proposal which includes lomboz run it all plug-ins If wtp, emf, jem and gef so.
2. Installation and Configuration Help
(1). Jdk installation configuration: Double click the downloaded exe setup file to install java application, the last main configuration environment variable.
Right on my computer - "High -" environment variable,
New environment variable JAVA_HOME, the variable value just installed the jdk directory (Figure 1):
Path of the variables in the environment variable value added to the end;% JAVA_HOME% \ bin;% JAVA_HOME% \ jre \ bin (Figure 2)
New environment variable CLASSPATH, the variable value.;% JAVA_HOME% \ lib;% JAVA_HOME% \ lib \ tools.jar;% CATALINA_HOME% lib \ servlet-api.jar (be careful not to lose in front.;, Point the current directory) (Figure 3):
(2). Tomcat installation and configuration:
jdk tomcat installation and setup process is similar mainly to set the environment variable.
New environment variable CATALINA_HOME, the variable value of tomcat installation directory, my installation directory is D: \ Program Files \ Apache Software Foundation \ Tomcat 6.0 (Figure 4):
New environment variable CATALINA_BASE, variable value of tomcat installation directory or the% CATALINA_HOME% (Figure 5):
And then modify the environment variable in the classpath, the tomat installation directory common \ lib under the (additional 1.6 according to the actual inside servlet-api.jar) servlet.jar to the classpath in additional to, the modified classpath is as follows: classpath =.;% JAVA_HOME% \ lib \ dt.jar;% JAVA_HOME% \ lib \ tools.jar;% CATALINA_HOME% \ common \ lib \ servlet.jar (Figure 6):
Environment variable is completed, enter in the browser address bar: http://localhost:8080 or http://127.0.0.1:8080/ . If the kitten image pages with Tomcat can.
(3). Eclipse green software, you can open the application download extract
3. In order to facilitate management methods can be links to the eclipse plug-in installed. By tomcat plug-in, for example, can create a directory called eclipseplugins then a tomcatplugins directory, and then in the directory below an eclipse directory, which eclipseplugins / tomcatplugins / eclipse tomcat plugin unpack the downloaded. If you extract the file inside plugins, features directory, you can copy these two directories to the eclipse directory, if not eclipse directory in the establishment of these two directories, and then unzip the tomcat plug-in copy to the plugins inside. After installing the program files in the eclipse links established under the name of the directory (name can not be changed), further at its next create a text file in a text file which input path = path = D: / Eclipseplugins / Tomcatplugins, (Note: The directory separator character is /, or \ \), file name tomcatplugins.link (file name and the suffix can be arbitrary, for example, we can also tomcatplugins.txt). Similar to other plug-ins can also be installed, each plug-in corresponds to a *. link file, for later if you want to delete a particular plug-in, then remove the plug-in corresponding link files. links documents and eclipseplugins file structure is as follows (Figure 7, Figure 8)
Set is complete, open the eclipse can be seen in the eclipse menu bar menu items new Tomcat. Open the Windows-"preferences, in the list on the left to see a list of items tomcat.
lomboz plug-in added successfully, in preference to do list box appears Server, web services other items of the installation was successful. If you do not see, check the links set up correctly.
Open Window -> Preferences -> Server-> Installed Runtime following window, select Add to add your server
New Project - Select Web / Dynamic Web Project, the next step in the project name in the Target Runtim fill HelloWord1 select just the increase in server Apache Tomcat 6.0
Right-click HelloWord1 select New JSP named index.jsp:
<% @ Page language = "java" contentType = "text / html; charset = ISO-8859-1"
pageEncoding = "ISO-8859-1"%>
<! DOCTYPE html PUBLIC "- / / W3C / / DTD HTML 4.01 Transitional / / EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Insert title here </ title>
Then right point HelloWord1-> Run -> run on server, how can there HelloWorld page.
And then later choose to default. This created a new Web project