Tomcat debugging question

B

Bernard

Hi,

I understand that running Tomcat on a development computer with the
built in HTTP server will let me debug servlets in an IDE.

Now I am running Tomcat on my local computer but I cannot see any 404
errors in the Tomcat logfile.

Does the web server support any such logging?

Otherwise, if I use Tomcat with Apache, then is there a way to debug
servlets?

Many thanks.
 
A

Arnaud Berger

Hi,

Please note that this question is tomcat-related, not java.

However, in the server.xml (conf dir), you will have to uncomment the
"Valve" with classname
org.apache.catalina.valves.AccessLogValve.

Regards,

Arnaud
 
D

Daniel Rohe

What Tomcat version? What JDK?

With Tomcat 5.0.x and JDK 1.4.x you can debug tomcat with the java debugging
interface.

For Eclipse there is the sysdeo plugin, but you can also use your own
debugging.
I've changed the startup.bat of Tomcat 5.0.x and changed the lines between
:doneSetArgs and :end

:doneSetArgs

set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=8000

call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%

:end

In Eclipse open the debug configuration dialog and create a new debug
configuration for "Remote Java Application". Select your project and look
that the connection properties are correct (Host: localhost, Port: 8000).
Enjoy debugging servlets.

The logging question is answered in the other post (Keyword: Valve).

Greetings
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top