aims:
1. Manage J2EE Project: Release Web Programs, Start / Close Server, etc. 2. Edit JSP / HTML / XML: Code Tips, Syntax Coloring, Error Tips 3. Track Debug JSP / Servlet: Setup, single step Execution, variable / stack / thread tracking, etc.
(1). Download and install the Sysdeo Tomcat plugin to manage Tomcat servers, provide breakpoint debugging
Http://www.sysdeo.com/eclipse/tomcatplugin.html
SysdeOTomcat plugin installation method:
Use Eclipse as a development environment of Jakarta Tomcat ---- A fast integration Eclipse and Tomcat method Geoffrey R. Duck
http://www-900.ibm.com/developerWorks/cn/opensource/os-ectom/
(2). Download installation Lomboz plugin, used to edit JSP / HTML / XML, etc.
http://www.objectLearn.com
Lomboz installation method:
* Develop JSP Zuo Jin using Eclipse
http://www-900.ibm.com/developerWorks/cn/java/l-jsp- Eclipse/index.shtml
* Develop J2EE apps using Eclipse ---- Integrated Eclipse, Lomboz and JBoss Jiang Wei
http://www-900.ibm.com/developerWorks/cn/java/l-eclipse-j2ee/index.shtml
(3). Quick guide
1.New Project -> Tomcat Project
2. Enter Project Name Next (cannot be built in an existing directory)
3. Enter Context Name is the name of the web application, determine the address of the time; enter the Subdirectory to Set As Web Application Root (Set to the root directory of the web application), it is a web directory, you can enter webApp (JBuilder default Name), or other, if you do not enter, it is directly built in the Project directory.
4. The catalog established at this time is:
WebApp / Web-INF / SRC default source file is placed in a web-inf directory (Tomcat Plugin)
When Work performs JSP, compiled servlet source files will be placed here (Tomcat Plugin)
Bin Eclipse defaults to build CLASSES files after compiling
SRC Eclipse default source file directory
Directory of the WebApp web application
5. The above directory can be changed in the Project property, I usually like to put the source file in the src directory, not the web-inf / src, output to the web-inf / class directory, not a bin directory.
6. The above-mentioned Web application is not web.xml. If you want to automate this file, you can execute a Lomboz J2EE Module wizard.
7. Run Tomcat (click the Tomcat plugin to add a new kitten icon on the interface.
Start / close Tomcat, the specific installation looks at the link on the above)
8.
Edit the JSP / HTML and other files, press the right button -> Open with-> JSP Editor (the red icon). File association can be set in the Window menu -> preferences-> Workbench-> file association settings.
9.
When debugging a Servlet or Struts, you can set a breakpoint as long as you double-click on the line number of the program, refresh the corresponding page (ie, a request), and the program is interrupted at the breakpoint.
If you want to debug JSP, a little more troubles, because it does not directly support JSP breakpoint debugging. To first put the page once, refresh the left directory (right button -> refresh) in the new Eclipse, will find the corresponding Work directory JAVA source file for the JSP file. Open this source file, set the breakpoint inside.