Start Tomcat in Debug mode

1) Open your Tomcat–>conf folder.

2) Open server.xml file in notepad or any other editor.

3) Search for these lines :

<Context path=”/—-” reloadable=”true” docBase=”—-” >
<Resource name=”jdbc/—-” auth=”Container” type=”javax.sql.DataSource” driverClassName=”oracle.jdbc.driver.OracleDriver” url=”jdbc:oracle:thin:@localhost:1521:orcl”

username=”—-”

password=”—-”

maxActive=”20″

maxIdle=”10″

maxWait=”-1″ />

</Context>

In the above syntax you have to fill some information that is given below

* path = write any name but this name must match with context path

of the application.

* docBase = write the project path.

* name=”jdbc/—- (write here database name).

* driverClassName= type of driver.

* url= complete path of database.

* username= database user name.

* password= database password .
4) open cmd –> set Tomcat directory path then write debug.bat(for Windows)

or ./debug.sh(for Linux).Press Enter,it will display your debug port no.

5) After finishing the above steps, in IDE(eclipse or netbeans)–> right click

on application–>click on debug as –> click on open debug dialog.

6) click on Remote java application–> right side one form will open.

write—>

name = project name or any name.

port = debug port number that is declared in debug.bat file which is inside
Tomcat directory or you can see on cmd (default is 9090).

7) Click on apply then debug.

8) Check the cmd,Now your Tomcat starts in debug mode. :D

Popularity: 6%

2 Responses to Start Tomcat in debug mode.

  1. limewire says:

    lol sweet stuff bro.

  2. Raj says:

    Very Nice post Aryan . I was looking for this.Very Informative.Keep up the good work :)

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.

Switch to our mobile site