1. Eclipse does not require plug-ins to use Tomcat for debugging
Step 1: configure the Tomcat Project
Two methods
1. Put your project under tomcat/webapp (this is not good, so the entire project will be put under tomcat, it is difficult to manage)
2. Configure Tomcat server. XML (recommended)
Configure the conf/server. xml method of Tomcat
Add under <Context Path = "/project1" docbase = "d :\\ vssclient \ project1 \ Web" DEBUG = "0"
Reloadable = "true" crosscontext = "true"/>
Path indicates the name of the accessed project, that is, http: // localhost: 8080/project1.
Docbase indicates the location of the web directory.
Reloadable = true indicates that Tomcat can dynamically load modified classes or resource files (Resources loaded by classloader)
Start Tomcat and test whether it is available. Then, go to step 2.
Step 2: configure the debug of eclipse
In eclipse, choose run> debug... to go to the settings page.
A new Java application, and then set relevant parameters
1. classpath
Add Bootstrap. Jar (under tcomat_home \ bin)
2. Main
Set main class to org. Apache. Catalina. startup. Bootstrap.
3. Argument
1) program argument is set to: Start-config "D: \ jakarta-tomcat-4.1.31 \ conf \ Server. xml"
2) VM argument is set:
-Dcatalina. Home = "D: \ jakarta-tomcat-4.1.31"
-Djava. endorsed. dirs = "D: \ jakarta-tomcat-4.1.31 \ common \ endorsed"
-Dcatalina. base = "D: \ jakarta-tomcat-4.1.31"
-Djava. Io. tmpdir = "d :\ jakarta-tomcat-4.1.31 \ Temp"
(Note that D: \ jakarta-tomcat-4.1.31 should be your actual path)
4. Start
Select the newly added Java application in debug on the toolbar to start Tomcat.
Set a breakpoint in the Java program and access the page to go to the test.
2. Eclipse does not require plug-ins to use WebLogic for debugging
Step 1: Set up the Weblogic Project
1. Create a domain
2. Set config. xml under domain
Add application:
<Application name = "project1" Path = "D: \ vssclient \ project1 \ Web"
Stagingmode = "nostage" TwoPhase = "true">
<Webappcomponent name = "project1" targets = "myserver" uri = "/"/>
</Application>
Name indicates the name of the application.
Path indicates the Application Path.
The name of webappcomponent indicates the access name.
Start WebLogic test to see if you can access
Step 2: configure the debug of eclipse
In eclipse, choose run> debug... to go to the settings page.
A new Java application, and then set relevant parameters
1. classpath
Add WebService. jar, weblogic. jar, and ojdbc14.jar under $ weblogic_home $/weblogic81/Server/lib /.
2. Main
Set main class to weblogic. Server
3. Argument
1) set program argument
"-Xms32m-xmx200m-XX: maxpermsize = 128 M-dweblogic. name = myserver-dbea. home = "E:/BEA"-dweblogic. management. username = weblogic-dweblogic. management. password = 11111111
-Dweblogic. productionmodeenabled = false
-Djava. Security. Policy = "E:/BEA/weblogic81/Server/lib/weblogic. Policy"
(You must change the Weblogic user name and password along with the path)
2) VM argument is set
Specific-D parameters are optional based on your needs
3) set work directory
4. Start
Select the newly added Java application in debug on the toolbar to start Tomcat.
Set a breakpoint in the Java program and access the page to go to the test.