head	1.10;
access;
symbols;
locks
	nobody:1.10; strict;
comment	@# @;


1.10
date	99.10.12.00.17.06;	author nobody;	state Exp;
branches;
next	1.9;

1.9
date	99.07.30.13.42.31;	author nobody;	state Exp;
branches;
next	1.8;

1.8
date	99.07.30.13.33.38;	author nobody;	state Exp;
branches;
next	1.7;

1.7
date	99.07.23.16.18.39;	author nobody;	state Exp;
branches;
next	1.6;

1.6
date	99.07.22.18.46.30;	author nobody;	state Exp;
branches;
next	1.5;

1.5
date	99.07.22.18.44.22;	author nobody;	state Exp;
branches;
next	1.4;

1.4
date	99.07.21.23.51.15;	author nobody;	state Exp;
branches;
next	1.3;

1.3
date	99.07.21.23.51.06;	author nobody;	state Exp;
branches;
next	1.2;

1.2
date	99.07.21.23.50.52;	author nobody;	state Exp;
branches;
next	1.1;

1.1
date	99.07.21.23.50.36;	author nobody;	state Exp;
branches;
next	;


desc
@null
@


1.10
log
@null
@
text
@IDependOn-Set: 1
IDependOn-Set: 119
IDependOn-Set: 2
IDependOn-Set: 241
IDependOn-Set: 257
IDependOn-Set: 259
LastModifiedSecs: 939687424
Parent: 119
SequenceNumber: 7
Title: How do I debug my servlets?
Part: 0
Author-Set: jon@@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 932601075
Type: monospaced
Lines: 35

----------
From: Luc Saint-Elie <lse@@imaginet.fr>
To: "Java Apache Users" <java-apache-users@@list.working-dogs.com>
Subject: Re: How to debug servlets in jserv?
Date: Wed, Jul 21, 1999, 4:43 PM


I didn't try it.. but lutris (http://www.enhydra.org) just released a free 
servlet debugger.. you may want to have a look at it.

Le 15:44 21/07/99 -0600, Dave King a crit:
>I'm sure this is a FAQ question (it was on the Java Web Server Mailing
>list) and I promise to add it to the FAQ-O-Matic when I find out how.
>
>In the java web server you could run it as a console app and you'd see
>the System.out messages.  Doesn't seem to work with apache on NT.
>
>log() works but I'm wondering if  anyone has details on attaching a
>debugger to jserv or other debuging sugestions.
>
>I'm using JDK 1.2.1 on NT.
>
>-Peace
>Dave

+------------------------------------------------+
| Luc Saint-Elie                                 |
| 75018 Paris France                             |
| Tel: 1(212)894 3713 ext: 0012                  |
| email : luc@@interpasnet.com                    |
+------------------------------------------------+
| Java Server Side Open Source technologies      |
| http://www.interpasnet.com/JSS                 |
+------------------------------------------------+
EndPart: 0
Part: 1
Author-Set: jon@@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 932669190
Type: monospaced
Lines: 69
----------
From: Andy John <andy@@Enhydra.ORG>
To: java-apache-users@@list.working-dogs.com
Subject: Re: How to debug servlets in jserv?
Date: Wed, Jul 21, 1999, 11:17 PM


When I needed to see stdout from my servlet, I set up JServ so that
the backend was running in a "normal" VM that I started.

In Apache's httpd.conf, set ApJServManual to "on". Now when Apache
starts up, it won't fire up a VM to run the back end. Of course,
servlets are now broken until you do it manually...

Then I wrote my own shell script to start the VM. This is on Unix,
your milage may vary. Here's what it does:

#!/bin/sh
JAVA=/usr/local/jdk1.1.7/bin/java
CLASS=org.apache.jserv.JServ
CP=/u/shawntmp/aj10/src/java/ApacheJServ.jar:/usr/local/jsdk2.0/lib/jsdk.jar
http/jserv-demo-80/EnhydraDebugger/enhydra.jar
CONF=/u/http/jserv-demo-80/conf/jserv.properties
CLASSPATH=$CP
export CLASSPATH
$JAVA $CLASS $CONF


Since you start the VM "normally", when your servlet writes to stdout, you 
will see it.




There is another option.... :)
You could try the EnhydraServletDebugger!
This is a servlet that you run in addition to your problem servlet (in the
same zone). You connect to it and run the debugger (the front end is an
applet). You then connect to your own servlet through the debugger, and
it logs all the requests.

This would not show output to stdout. It does not set breakpoints, or step
through your code. It does show you all the detail of the request, the
response, the output (if html or text), and every call your servlet made
to the request/response API (including the results given to your servlet).

So, for example, you would be able to see that your serlvet is asking for
a list of all headers, and see what was given to it. Then you notice that
one of them is spelled differently than you thought. Aha!!!

We have used this kind of debugging for a year now, and it has saved us
many many hours of frustration. Your servlet must be running enough to
handle responses for it to be useful, of course.

Here is some screenshots, so you can get a feel for it:

Request details:   http://www.enhydra.org/media/screenshots/SADebuggerRequest.gif
Servlet API trace: http://www.enhydra.org/media/screenshots/SADebuggerTrace.gif
Response details:  http://www.enhydra.org/media/screenshots/SADebuggerResponse.gif


Here is where to download it:

http://www.enhydra.org/cuts/EnhydraServletDebugger_b1.zip

See the file README.html for installation instructions.

Hope this helps!
   Andy
EndPart: 1
Part: 2
Author-Set: dking@@iknowledgeinc.com
HideAttributions: 1
LastModifiedSecs: 932746719
Type: monospaced
Lines: 11
Just a quick follow up to Andy's note:

Andy notes that ApJServManual is in httpd.conf but on a new install it's in 
jserv.conf in the Apache Group/Apache JServ/conf dir. The install has
httpd.conf include jserv.conf.

On NT I used the following comand line:
java -cp C:\PROGRA~1\APACHE~1\APACHE~1\ApacheJServ.jar org.apache.jserv.JServ C:\PROGRA~1\APACHE~1\APACHE~1\conf\jserv.properties

-Peace
Dave
EndPart: 2
Part: 3
Author-Set: ted@@guilds.net
HideAttributions: 1
LastModifiedSecs: 933341617
Type: monospaced
Lines: 26
Thanks to Andy John's post on controlling the VM from scripts and setting ApJServManual 
to "on" I was inspired to get IBM/Alphaworks' Jikes debugger (an all java visual debugger, 
drill down on Java from http://alphaworks.ibm.com/tech/) working with Jserv to complement 
my Emacs/JDE (http://sunsite.auc.dk/jde/) environment. 

I set all my classpath and such in a modified Jikes startup script:

#!/bin/sh
# jd involks Jikes debugger
# Set JD and JDK to match the appropriate installation directories on your system.
# Jikes wants a classpath passed it, it and sourcepath can be altered while running

JD=/home/ted/bin/jikesdb/jd.zip
JDK=/usr/local/jdk116_v5/lib/classes.zip
CP=$CLASSPATH
set -x
java "-Deditor=emacs +%L %F" -classpath $CP:$JD:$JDK jd.Main -classpath $JD:$CP:$JDK $* 
#yes it's got hooks into emacs as well

and start jserv like this:

#!/bin/sh
jd org.apache.jserv.JServ /usr/local/apache/conf/jserv.properties

I can then set breakpoints in any object or servlet anywhere in my class and 
source paths and see how things are when it gets called in a url.
EndPart: 3
Part: 4
Author-Set: ted@@guilds.net
HideAttributions: 1
LastModifiedSecs: 933342151
Type: monospaced
Lines: 3
P.S. Jikes debugger is free and well worth the look.

ted@@guilds.net
EndPart: 4
Part: 5
Author-Set: scott@@eionline.com
HideAttributions: 1
LastModifiedSecs: 939687424
Type: monospaced
Lines: 11
I have been able to use JBuilder 3 on Windows NT to debug my servlets.

First, I downloaded JServ.java from WebCVS and added it to my project.
Next, I set JServ.java to be the default runnable file in the project properties.
Next, in the project properties I added c:\path2jerv\conf\jserv.properties to 
the parameters.

Set your breakpoints, start debugging (Shift+F9), and you're off!!

Scott Sanders
scott@@eionline.com
EndPart: 5
@


1.9
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 933342151
d9 1
a9 1
SequenceNumber: 6
d190 18
@


1.8
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 933341617
d9 1
a9 1
SequenceNumber: 5
d180 10
@


1.7
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 932746719
d9 1
a9 1
SequenceNumber: 4
d147 33
@


1.6
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 932669190
d9 1
a9 1
SequenceNumber: 3
d129 18
@


1.5
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 932601075
d9 1
a9 1
SequenceNumber: 2
d53 76
@


1.4
log
@null
@
text
@d6 1
@


1.3
log
@null
@
text
@d6 1
a6 1
LastModifiedSecs: 932601066
d8 1
a8 1
SequenceNumber: 1
d10 42
@


1.2
log
@null
@
text
@d6 1
a6 1
LastModifiedSecs: 932601036
d8 2
a9 2
SequenceNumber: 0
Title: New Item
@


1.1
log
@null
@
text
@d4 1
@
