First, install the JDK
Portal:
http://write.blog.csdn.net/postedit/39999433
Second, installation MyEclipse
In fact it is also possible to install Eclipse and then install MyEclipse and then extract the MyEclipse plugin to eclipse, but here I use myeclipse so omitted.
MyEclipse and Cracked links
Third, download Tomcat
Tomcat X6 x64 Free installation version
As for why the free install version is due to be able to use multiple Tomacat version numbers later
Iv. Configuring Tomcat
After downloading, unzip it directly under the root folder of a certain disk. I'm on the D-plate, for example.
Finally configure the Tomcat environment variables:
On the My Computer, right-click Properties, Advanced, environment variables (N).
New system Variable catalina_home:d:\jakarta-tomcat-5.0.30
Added after the value of the system variable classpath:%catalina_home%\common\lib;
In the value of the system variable path, "%java_home%\bin;" The following additions are added:%catalina_home%\bin;
Here, the Tomcat configuration is complete.
V. Specifying the MyEclipse JRE and Tomcat server
1. Setting the MyEclipse JRE
Under normal circumstances. Eclipse has the ability to proactively find the JRE, and we don't have to make too many settings.
2. Set the MyEclipse Tomcat server
Just set the two places marked in the diagram, the rest of the diagram is self-generated.
Windows-preference-tomcat 6.x
Here, our Eclipse+myeclipse development environment is built!
Vi. New Project Testing
1. In the MyEclipse, tap File----> New----> Project, and in the new Project dialog box that pops up, click
Web Project---->myeclipse---->J2EE Projects---->web Project ",
Click "Next", enter the project name "Test" in "Project name" and the last point "Finish".
2. Click "Test" on the MyEclipse left Package Explorer list to expand the project test.
Right-click WebRoot----> New----> JSP to create a new JSP page named hello.jsp.
The code, for example, (the callout part of the figure needs us to join manually, the rest of the system itself is generated voluntarily):
Code:
<span style= "FONT-SIZE:18PX;" ><%@ page language= "java" import= "java.util.*" pageencoding= "GBK"%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
3. In the same way, create a new JSP file called hello_result.jsp, code such as the following:
<span style= "FONT-SIZE:18PX;" ><%@ page language= "java" import= "java.util.*" pageencoding= "GBK"%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
Vii. Deploy (Deploy) project.
Click on the Deploy button (the button with the red line is the Deploy button), click Add in the pop-up form and deploy the test project (as seen).
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvemh1yw5namluz3lhbmc=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast ">
Then select Project as test:
Click Add
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvemh1yw5namluz3lhbmc=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast ">
Click on Finish-ok to
Finally click on the Run-tomact 6.x-start on the right of deploy
Executed successfully.
Finally open the browser input:
http://localhost:8080/test/hello.jsp
You can see the result: