Trace through a web application

Hello ...
 I am a Bioinformatist new to Java Technologies but fair knowledge in other lang.
(Perl,C and CGI scripting)

Our lab is using an application that is deployed on a J2EE app server(TomCat) and primarily uses JSP and servlets with a db that is Oracle ...


In order to understand the application I wish to "trace" through the applictaion.I have the source for the application.But I am not sure if
I can trace through a web based application as I do for a non -web based application.

Thanks for your time.
micro_learnerAsked:
Who is Participating?
 
petmagdyConnect With a Mentor Commented:
You can use remote debbuging as following:

1- open the batch that starts tomcat and add this line before the line to execute the JVM (Command Prompet>java ........ ) :

set JAVA_VM=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=7777,server=y,suspend=n

then modify the line initiate the Tomcat Java process to be from

java ......

to be java %JAVA_VM% ...............

2- from netbeans configure remote debbuging

debug --> start session ---> attach specify that the socket connector is socket attach and specify the host name to the tomcat server and the port will be 7777

3- But ur break points in the application code and then run the application on tomcat it suppose to stop at break points and trace
0
 
TimYatesConnect With a Mentor Commented:
If you run it in an IDE like JBuilder, then yes you can step through it in exactly the same way...

You *can* put debug (System.out.println) lines in too, and see what comes out of catclina.out (in the logs dir of tomcat)

Is there a framework in use?  (Struts, Tapestry, etc)?

If so, there will be XML config files inside WEB-INF of the web application which should show you how a URL maps to a piece of code...

Tim
0
 
TimYatesCommented:
There is Eclipse as well (www.eclipse.org) which is another IDE (but free), and that allows you to trace through JSPs as well (I believe) though I have never tried it...

Tim
0
 
micro_learnerAuthor Commented:
Thanks for the reply ..I have Netbeans installed ...can I do with this.

Also Here they use "Castor" to retreve ..

Also could you direct me to a quick tutorial ...or something similar so that I can get the rudiments needed quickly
0
 
TimYatesCommented:
Yeah, you should be able to...

Hmmmm...never used Castor... It's a JDO thing (so it saves Java objects into the database without you having to do too much) I believe :-)

but I have to go home now...

I'll have a look tomorrow if no-one else has jumped in with more help :-)

0
All Courses

From novice to tech pro — start learning today.