1、安装JDK、配置JRE
•Directory without blank inname
•JAVA_HOME
–Dir of JDK
•PATH
–%JAVA_HOME%\bin
2、安装tomcat
3、加压eclipse (KEPLER)
•Window-Preference-General-Workspace
•Set text file encoding to UTF-8
•Window-Show View-Servers-Create new Server
•Select your Tomcat pathand JDK
•Finish
•File – New – Dynamic web project
•Name
•Version2.5
•Default out folder =web/WEB-INF/classes
•Content directory = web
•Finish
•
Servers – Tomcat 6.0Server for
localhost
•Modules – Add – Externalweb module
•Document base = yourproject’s web directory
•Path = /sp, Auto reloadingenabled = false
•OK
•File - Save
•Servers – Tomcat 6.0 for localhost
•Right click – debug
•See : Server start up inxxx ms
4、 右击 .jsp 文件 > Run As > Run on server
在弹出的窗口中选择一个Tomcat
点击OK