Develop JSP articles with Eclipse - 2. Establish a Lomboz project consideration

xiaoxiao2021-03-06  67

1.File-> new-> Project-> java-> Lomboz J2EE Wizards-> Lomboz J2ee Project

Enter your own project name in Project Name, and the directory name of the project. Enter the storage path in Project Contents, usually do not use the default, for JSP projects, usually in Tomcat's WebApps directory.

2, then follow the default settings as follows, here you want to add the item's Web Modules, set to the same name or other name with the project.

3, then select the application server you want to use in Targeted Servers, such as using Tomcat 5.x here.

4, after completion, right click on the project in the Package view, change the compiled servlet and JavaBean stored in Java Build Path, I usually put them directly into the JSP site Web Modules, such as web- Under INF / CLASSES, this can be observed directly on the website after compiling.

5. If you want to debug JSP in Eclipse, you can modify the JSP's Context property, set the workDir directory to the J2SRC in the project directory, so you can debug the program in the JSP compiled Java file.

The specific practice is to modify the ProjectName.xml file under% Tomcat_Home% / CONF / CATALINA / LOCALHOST:

In this way, after accessing the JSP page, the page compile content will appear in the J2SRC directory of the project (to refresh items), you can set the breakpoint to debug directly.

转载请注明原文地址:https://www.9cbs.com/read-118845.html

New Post(0)