Eclipse + myeclipse + Tomcat web development Configuration

Source: Internet
Author: User

First, you must have the following software:
1. JDK: http://java.sun.com/
2. Eclipse plaform SDK
: Http://www.eclipse.org/downloads/index.php
3, Tomcat: http://tomcat.apache.org/index.html
4. myeclipsewww.myeclipseide.com
Environment Configuration:
My computer-properties-advanced-environment variables, which have two options: User variables and environment variables. Since we operate on a single user, for fear of confusion with other environment variables, we would like to consider creating new ones in user variables and then configuring

Configure JDK first:

1. Create-variable name (PATH)-variable value (D: \ Program
Files \ Java \ jdk1.6.0 _ 02 \ bin)
2. Create-variable name (classpath)-variable value (.; D: \ Program
Files \ Java \ jdk1.6.0 _ 02 \ Lib \ tools. jar; D: \ Program
Files \ Java \ jdk1.6.0 _ 02 \ JRE \ Lib \ RT. jar ;)
3. Create-variable name (java_home)-variable value (D: \ Program Files \ Java \ jdk1.6.0 _ 02)

JDK is configured, and a helloworld is created. Program Verify that a new helloworld is created. java file, enter the program in it, and save. then run-cmd-find the path saved by your program (using Cd, c: \, and so on) and execute javac.
Helloworld. Java and then execute Java
Helloworld (remember there is no. Java later). If the DOS interface prints the word helloworld, your configuration is correct.
Public class helloworld {
Public static void main (string [] ARGs ){

System. Out. println ("Hello World ");}}

Ecipse is an openSource codeDirectly decompress the green software, you can use eclipse with powerful functions and support many plug-ins. I personally think it is very easy to use. For Beginners, you can also choose eclipse, which has become the choice of many developers today. And it's free.

Myeclipse is an Eclipse plug-in. There are two types of official downloads. With eclipse, you don't need to download and install all-in-one. install myeclipse automatically according to the default installation. Then, create a links file in the eclipse installation file, which contains a link file, open it in notepad and you can see Path = D: \ Program
Files \ myeclipse 6.0 (remember to install \ or/). This is the installation path of myeclipse and the preferred Installation Method for Eclipse plug-in installation.

two versions of Tomcat are available: extract the package and install the package. The installation package can have a green signal enabled in the lower right corner of the taskbar .. If you want to install and decompress the package. Decompress the package to the folder and set the environment
Create-variable name (tomcat-Home) variable value (D: \ Program Files \ eclipse \ apache-Tomcat-6.0.14)

Some people want tomcat to be displayed on the menu bar of the eclipse interface. You need to install atatplugins. However, myeclipse has been installed and is useless, set it in eclipse. Eclipse-window-preferences-myeclipse-servers-Tomcat select your version, enter your tomcat installation path, and select your JDK ...... Then, start Tomcat on your server. After it is started, enter http: // localhost: 8080/In the IE browser/
If you see the Tomcat homepage, your Tomcat service configuration is correct. Speaking of Tomcat involves a port problem, because only one port can be started at the same time, and sometimes you may encounter serious errors when starting tomcat, most of which are port problems. Here, I mind if you go to the tomcat installation file with startup. BAT and shutdown. one of the BAT files is to enable the Service, and the other is to disable the service. Click Shutdown first. bat shut down all the relevant port services, and restart the Tomcat service in eclipse. it is OK to start the Tomcat service. The first startup log may indicate that nothing can be found, this does not affect your JSP development. It is a version issue and I have not found a solution. However, some people would like to say that jdk1.5 can be installed. If you are interested, you can try it.

With the above settings, everything is OK. If you create a JSP, you must first create a web
Project, create a JSP language under webroot, and then you can write it. After compilation, run and save it, And then deploy it. There is a deployment key next to the server, add your path. It will prompt you. To run JSP, you need to start the Tomcat service first, and then enter your address in the IE browser, such as http: // localhost: 8080/
Web project name/JSP file name. jsp then you can see the results of your programming.

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.