Re: Debugging JSPs

2003-01-29 Thread Steven J. Owens
On Wed, Jan 29, 2003 at 11:24:30AM +0100, Ron van Pol wrote:
> I've asked some question before regarding remote debugging of JSPs
> with tomcat4. Since nobody has responded yet, I'll give it another
> try. Can anybody please tell me how they debug JSPs with tomcat4?

 With great care and painstaking slowness :-).

 Seriously, I've played with the JPDA remote-debugging stuff for
debugging complex servlets, but I didn't find it all that useful
(though I didn't try that hard, and I was only using a
half-implemented early version of JSwat, and arguably I was using it
for the wrong sort of problem).  However, I don't know how in the heck
you'd use that to remote-debug JSPs.

 From my limited experience with JSPs, most of the bugs occur in
either the JSP compiling stage, or in the process of running the
resulting servlet.  I would love ot see some flavor of JSP compiler
that provided more helpful error messages, maybe even a sort of JSP
"lint" tool.  Lest I seem ungrateful to the Tomcat crew, I should note
that I found Jasper, the JSP compiler that tomcat bundles, much more
helpful than the ones bundled with Weblogic and JRun.  However, either
way, I don't think that's amenable to remote debugging, other than by
just pushing the .JSP files up to the server and trying to load the
page.

 Now, the alternative is that you're talking about bugs in the
reuslting servlet code.  If you're seeing significant amounts and
complexity of bugs in the resulting servlet, you probably have too
much java in your JSP.  Move the java out to helper classes -
javabeans, or taglibs, or even (in a pinch) just special servlets or
singleton classes you can grab from your JSP.  Now you can remote
debug the helper classes the same way you would remote debug any java
class.

 In case you haven't tried that, yet, that essentially boils down
to starting the JVM with a special command-line option that sets up
the remote debugger and has it listen on a port for your debugger's
requests for information.  See more about how to do that with tomcat
here:

http://www.bluemarsh.com/java/jswat/docs/howto-servlet.html

 There *must* be something on this topic at the jakarta website,
right?  I couldn't find it with a little surfing,... ah, *here* it is:

http://jakarta.apache.org/site/idedev-rdtomcat.html

 Oh, hey, somebody on the JSwat user mailing list says they've
figured out how to remote-debug JSPs with tomcaT:

http://www.bluemarsh.com/pipermail/jswat-user/2002-September/001317.html

 It's amazing what you can do with a little web surfing :-) Don't
feel too bad, though; I've googled fruitlessly for hours, in the past,
and finally broke down and posted a request, only to have somebody
come back with, "Gee, I just plugged 
into google and the answer was on the first hit."  Some days you get
the bear, some days the bear gets you :-).

Steven J. Owens
[EMAIL PROTECTED]

"I'm going to make broad, sweeping generalizations and strong,
 declarative statements, because otherwise I'll be here all night and
 this document will be four times longer and much less fun to read.
 Take it all with a grain of salt." - Me at http://darksleep.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Antwort: Debugging JSPs

2003-01-29 Thread Dietmar . Mueller

I use Netbeans. You can get it at www.netbeans.org.

NetBeans (current Version 3.4.1) use the integratet tomcat4.0.4  but I read
somewhere
that you can also debug remote.

Dietmar





"Ron van Pol" <[EMAIL PROTECTED]> am 29.01.2003 11:24:30

Bitte antworten an "Tomcat Users List" <[EMAIL PROTECTED]>

An:"Tomcat Users List (E-mail)" <[EMAIL PROTECTED]>
Kopie:
Thema: Debugging JSPs


Hi there,

I've asked some question before regarding remote debugging of JSPs with
tomcat4. Since nobody has responded yet, I'll give it another try. Can
anybody please tell me how they debug JSPs with tomcat4?

Regards,
Ron








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Debugging JSPs

2003-01-29 Thread Ron van Pol
Hi there,

I've asked some question before regarding remote debugging of JSPs with
tomcat4. Since nobody has responded yet, I'll give it another try. Can
anybody please tell me how they debug JSPs with tomcat4?

Regards,
Ron



Remote debugging JSPs

2003-01-09 Thread Ron JCH. van Pol
Hi,

 

Has anyone succesfully setup remote debugging of Java ServerPages with
Tomcat4? I am able to debug servlet using JPDA but not with Java
ServerPages. Any suggestion would be greatly appreciated.

 

Thanks,

Ron




RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2

2002-11-19 Thread Larry Isaacs
Bruce,

To see where the "-g" comes from, see:

<http://cvs.apache.org/viewcvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/SunJavaCompiler.java?rev=1.2.4.1&content-type=text/vnd.viewcvs-markup>

Since the invocation of the Java compiler is under the control
of Jasper, you don't have much control over the arguments it is
passed.

After giving it a quick try with Tomcat 3.2.4, it appears the
conf/web.xml is out of date with respect to the JSP servlet.
The correct class name is org.apache.jasper.servlet.JspServlet.
The following worked for me:



jsp


org.apache.jasper.servlet.JspServlet



classdebuginfo
true


-2147483646


...


jsp


*.jsp



Cheers,
Larry

> -Original Message-
> From: Bruce Dahms [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, November 18, 2002 12:59 PM
> To: 'Tomcat Users List'
> Subject: RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> 
> 
> Hi Larry:
> 
> Thanks for that tip. Unfortunately, I'm still not able to set 
> this working.
> It's strange because I can debug an ordinary servlet (e.g., 
> one that comes
> with Tomcat), but I can't debug a servlet created by Jasper.  
> 
> Do you have any other suggestions?  Can I put a CLASSDEBUG 
> attribute in the
> SERVER.XML file (I can't tell since it doesn't have a DTD)?  Do I have
> anything missing from the Java command line I'm using to 
> start Tomcat?  I
> tried adding "-Xint" but that didn't help.  Is there a Jasper 
> configuration
> file I can modify?  I believe I just need to add a "-g" to 
> the Javac command
> line that creates the compiled servlet, but I don't know how 
> to do that.
> 
> Thanks in advance.
> 
> Bruce
> 
> > -Original Message-
> > From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 15, 2002 07:11
> > To: Tomcat Users List
> > Subject: RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> > 
> > 
> > Reading of the "conf/web.xml" go turned off for Tomcat 3.2.x,
> > though the file is still present.  You should add the XML
> > below to the "WEB-INF/web.xml" for the webapps you want to
> > debug.
> > 
> > Cheers,
> > Larry
> > 
> > > -Original Message-
> > > From: Bruce Dahms [mailto:[EMAIL PROTECTED]] 
> > > Sent: Thursday, November 14, 2002 4:28 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> > > 
> > > 
> > > I'm using NetBeans 3.3.2 with an EXTERNAL instance of Tomcat 
> > > 3.2.3.  I'm 
> > > trying to configure Tomcat so I can watch JSP variables and 
> > > expressions.  
> > > Here is how I'm starting Tomcat:
> > > 
> > >  start "Tomcat 3.2.3" 
> > >"C:\Java\1.3.0_02\bin\java" -classic -Xdebug 
> > >-Xnoagent -Djava.compiler=NONE 
> > >
> > -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address= 
> > >-Dtomcat.home="C:\jakarta-tomcat-3.2.3" 
> > >org.apache.tomcat.startup.Tomcat
> > > 
> > > Once Tomcat is running, I can attach to it from NetBeans via 
> > > dt_socket on 
> > > port .  I can then mount the compiled servlet in 
> NetBeans, set 
> > > a breakpoint, and execute up to that breakpoint.  What I 
> > cannot do is 
> > > watch variables or expressions.  If I specify a variable 
> to watch, 
> > > NetBeans tells me the "Identifier cannot be resolved."  
> > > 
> > > At the top of the variables list in the NetBeans debugger 
> window is 
> > > the message "source compiled without -g option."  This 
> leads me to 
> > > believe Tomcat isn't creating the servlet with the required 
> > > debugging information.  I enabled the "classdebuginfo" 
> parameter in 
> > > Tomcat's WEB.XML, but this seems to have no effect.  Here's 
> > > an excerpt:
> > > 
> > >  
> > >jsp
> > >
> > org.apache.jasper.runtime.JspServlet
> > >
> > >  classdebuginfo
> > >  true
> > >
> > >-2147483646
> > >  
> > >  
> > >jsp
> > >*.jsp
> > >  
> > > 
> > > Any suggestions?  The application I'm using requires Tomcat 
> > 3.2.3.  I 
> > > cannot use a different version of Tomcat.
> > > 
> > > Bruce
>  
> 
> This communication is intended for the use of the recipient 
> to which it is
> addressed, and may contain confidential, personal and or privileged
> information. Please contact us immediately if you are not the intended
> recipient of this communication, and do not copy, distribute, 
> or take action
> relying on it. Any communication received in error, or 
> subsequent reply,
> should be deleted or destroyed.
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2

2002-11-18 Thread Bruce Dahms
Hi Larry:

Thanks for that tip. Unfortunately, I'm still not able to set this working.
It's strange because I can debug an ordinary servlet (e.g., one that comes
with Tomcat), but I can't debug a servlet created by Jasper.  

Do you have any other suggestions?  Can I put a CLASSDEBUG attribute in the
SERVER.XML file (I can't tell since it doesn't have a DTD)?  Do I have
anything missing from the Java command line I'm using to start Tomcat?  I
tried adding "-Xint" but that didn't help.  Is there a Jasper configuration
file I can modify?  I believe I just need to add a "-g" to the Javac command
line that creates the compiled servlet, but I don't know how to do that.

Thanks in advance.

Bruce

> -Original Message-
> From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 15, 2002 07:11
> To: Tomcat Users List
> Subject: RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> 
> 
> Reading of the "conf/web.xml" go turned off for Tomcat 3.2.x,
> though the file is still present.  You should add the XML
> below to the "WEB-INF/web.xml" for the webapps you want to
> debug.
> 
> Cheers,
> Larry
> 
> > -Original Message-
> > From: Bruce Dahms [mailto:[EMAIL PROTECTED]] 
> > Sent: Thursday, November 14, 2002 4:28 PM
> > To: [EMAIL PROTECTED]
> > Subject: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> > 
> > 
> > I'm using NetBeans 3.3.2 with an EXTERNAL instance of Tomcat 
> > 3.2.3.  I'm 
> > trying to configure Tomcat so I can watch JSP variables and 
> > expressions.  
> > Here is how I'm starting Tomcat:
> > 
> >  start "Tomcat 3.2.3" 
> >"C:\Java\1.3.0_02\bin\java" -classic -Xdebug 
> >-Xnoagent -Djava.compiler=NONE 
> >
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address= 
> >-Dtomcat.home="C:\jakarta-tomcat-3.2.3" 
> >org.apache.tomcat.startup.Tomcat
> > 
> > Once Tomcat is running, I can attach to it from NetBeans via 
> > dt_socket on 
> > port .  I can then mount the compiled servlet in NetBeans, set 
> > a breakpoint, and execute up to that breakpoint.  What I 
> cannot do is 
> > watch variables or expressions.  If I specify a variable to watch, 
> > NetBeans tells me the "Identifier cannot be resolved."  
> > 
> > At the top of the variables list in the NetBeans debugger window is 
> > the message "source compiled without -g option."  This leads me to 
> > believe Tomcat isn't creating the servlet with the required 
> > debugging information.  I enabled the "classdebuginfo" parameter in 
> > Tomcat's WEB.XML, but this seems to have no effect.  Here's 
> > an excerpt:
> > 
> >  
> >jsp
> >
> org.apache.jasper.runtime.JspServlet
> >
> >  classdebuginfo
> >  true
> >
> >-2147483646
> >  
> >  
> >jsp
> >*.jsp
> >  
> > 
> > Any suggestions?  The application I'm using requires Tomcat 
> 3.2.3.  I 
> > cannot use a different version of Tomcat.
> > 
> > Bruce
 

This communication is intended for the use of the recipient to which it is
addressed, and may contain confidential, personal and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take action
relying on it. Any communication received in error, or subsequent reply,
should be deleted or destroyed.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2

2002-11-15 Thread Larry Isaacs
Reading of the "conf/web.xml" go turned off for Tomcat 3.2.x,
though the file is still present.  You should add the XML
below to the "WEB-INF/web.xml" for the webapps you want to
debug.

Cheers,
Larry

> -Original Message-
> From: Bruce Dahms [mailto:bdahms@;netscape.net] 
> Sent: Thursday, November 14, 2002 4:28 PM
> To: [EMAIL PROTECTED]
> Subject: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> 
> 
> I'm using NetBeans 3.3.2 with an EXTERNAL instance of Tomcat 
> 3.2.3.  I'm 
> trying to configure Tomcat so I can watch JSP variables and 
> expressions.  
> Here is how I'm starting Tomcat:
> 
>  start "Tomcat 3.2.3" 
>"C:\Java\1.3.0_02\bin\java" -classic -Xdebug 
>-Xnoagent -Djava.compiler=NONE 
>-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address= 
>-Dtomcat.home="C:\jakarta-tomcat-3.2.3" 
>org.apache.tomcat.startup.Tomcat
> 
> Once Tomcat is running, I can attach to it from NetBeans via 
> dt_socket on 
> port .  I can then mount the compiled servlet in NetBeans, set 
> a breakpoint, and execute up to that breakpoint.  What I cannot do is 
> watch variables or expressions.  If I specify a variable to watch, 
> NetBeans tells me the "Identifier cannot be resolved."  
> 
> At the top of the variables list in the NetBeans debugger window is 
> the message "source compiled without -g option."  This leads me to 
> believe Tomcat isn't creating the servlet with the required 
> debugging information.  I enabled the "classdebuginfo" parameter in 
> Tomcat's WEB.XML, but this seems to have no effect.  Here's 
> an excerpt:
> 
>  
>jsp
>org.apache.jasper.runtime.JspServlet
>
>  classdebuginfo
>  true
>
>-2147483646
>  
>  
>jsp
>*.jsp
>  
> 
> Any suggestions?  The application I'm using requires Tomcat 3.2.3.  I 
> cannot use a different version of Tomcat.
> 
> Bruce
> 
> 
> 
> __
> The NEW Netscape 7.0 browser is now available. Upgrade now! 
> http://channels.netscape.com/ns/browsers/downl> oad.jsp 
> 
> Get 
> your own FREE, personal Netscape Mail account 
> today at http://webmail.netscape.com/
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>




Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2

2002-11-14 Thread Bruce Dahms
I'm using NetBeans 3.3.2 with an EXTERNAL instance of Tomcat 3.2.3.  I'm 
trying to configure Tomcat so I can watch JSP variables and expressions.  
Here is how I'm starting Tomcat:

 start "Tomcat 3.2.3" 
   "C:\Java\1.3.0_02\bin\java" -classic -Xdebug 
   -Xnoagent -Djava.compiler=NONE 
   -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address= 
   -Dtomcat.home="C:\jakarta-tomcat-3.2.3" 
   org.apache.tomcat.startup.Tomcat

Once Tomcat is running, I can attach to it from NetBeans via dt_socket on 
port .  I can then mount the compiled servlet in NetBeans, set 
a breakpoint, and execute up to that breakpoint.  What I cannot do is 
watch variables or expressions.  If I specify a variable to watch, 
NetBeans tells me the "Identifier cannot be resolved."  

At the top of the variables list in the NetBeans debugger window is 
the message "source compiled without -g option."  This leads me to 
believe Tomcat isn't creating the servlet with the required 
debugging information.  I enabled the "classdebuginfo" parameter in 
Tomcat's WEB.XML, but this seems to have no effect.  Here's an excerpt:

 
   jsp
   org.apache.jasper.runtime.JspServlet
   
 classdebuginfo
 true
   
   -2147483646
 
 
   jsp
   *.jsp
 

Any suggestions?  The application I'm using requires Tomcat 3.2.3.  I 
cannot use a different version of Tomcat.

Bruce



__
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Debugging JSPs and Servlets

2002-02-27 Thread August Detlefsen

For the quick and dirty approach, you can put System.out.println()
statements in your code and find the output in:

TOMCAT_HOME/logs/catalina.out



--- Sriram Narayanan <[EMAIL PROTECTED]> wrote:
> 2/27/02 11:17:26 PM, "Nitin Vira" <[EMAIL PROTECTED]> wrote:
> 
> >Hello,
> >
> >I am trying to create an environment that will assist in debugging
> jsps, i think one of the basic ways to do debugging is through
> logging, I want 
> to log various request coming in along with the request parameters, i
> checked the access loggs but they only logg GET request also it
> doesnt 
> logg the parameters, is there anyway i can logg POST request too
> along with the request parameters, i can possibly use a filter to do
> it, will that 
> be a right approach also can i configure a filter to run for all the
> servlets? Also is it possible to logg something like forwards to
> another page and 
> including other pages, also if you have any other suggestions to add
> features that will assist in debugging that i can implement i will
> greatly 
> appreciate it.
> >
> 
> Use Log4J. (http://jakarta.apache.org/log4j) 
> 
> Log4J has something called Logging Levels, e.g. DEBUG, ERROR, INFO
> etc...
> 
> Let's say you have some 15 packages with some 10 classes in each.
> 
> In each class, instantiate a Logger with the statement
> 
> static Logger logger = Logger.getInstance(MyClass.class.getName());
> 
> Now within the class, write both DEBUG level statements and INFO
> level statements:
> 
> e.g. 
> 
> public void someTask(String first, String second){
>   logger.debug("just entered the someTask method, args are " + first +
> ":" + second);
>   logger.info("about to calculate something");
>   int x = calculate();
>   logger.debug("the calculation result was " + x);
> }
> 
> Now, DEBUG levels happen to be lower in importance than INFO levels. 
> 
> Log4J can be instructed on which level to log via a properties file.
> So, you can change log levels, or even disable loggin altogether via
> an external properties file. No changes to the code are required at
> all.
> 
> Also, you can specify that the log outputs from a particular class
> should be redirected to one file, while all other logs could go to
> another file, or 
> even a JDBC target.
> 
> 
> >Thanks,
> >Nitin
> >
> 
> Sriram
> 
> 
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Debugging JSPs and Servlets

2002-02-27 Thread Craig R. McClanahan



On Wed, 27 Feb 2002, Nitin Vira wrote:

> Date: Wed, 27 Feb 2002 09:47:26 -0800
> From: Nitin Vira <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Debugging JSPs and Servlets
>
> Hello,
>
> I am trying to create an environment that will assist in debugging jsps,
> i think one of the basic ways to do debugging is through logging, I want
> to log various request coming in along with the request parameters, i
> checked the access loggs but they only logg GET request also it doesnt
> logg the parameters, is there anyway i can logg POST request too along
> with the request parameters, i can possibly use a filter to do it, will
> that be a right approach also can i configure a filter to run for all
> the servlets? Also is it possible to logg something like forwards to
> another page and including other pages, also if you have any other
> suggestions to add features that will assist in debugging that i can
> implement i will greatly appreciate it.
>
> Thanks,
> Nitin
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>

Logging stuff for yourself is a nice use case for a Filter.  In fact,
there's an example filter that does this kind of thing in the examples
webapp included with Tomcat 4.  Source code is in file
"/WEB-INF/classes/filters/RequestDumperFilter.java".  You can see how it's
configured by looking at the web.xml file for this app.

Craig



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: Debugging JSPs and Servlets

2002-02-27 Thread Sriram Narayanan

2/27/02 11:17:26 PM, "Nitin Vira" <[EMAIL PROTECTED]> wrote:

>Hello,
>
>I am trying to create an environment that will assist in debugging jsps, i think one 
>of the basic ways to do debugging is through logging, I want 
to log various request coming in along with the request parameters, i checked the 
access loggs but they only logg GET request also it doesnt 
logg the parameters, is there anyway i can logg POST request too along with the 
request parameters, i can possibly use a filter to do it, will that 
be a right approach also can i configure a filter to run for all the servlets? Also is 
it possible to logg something like forwards to another page and 
including other pages, also if you have any other suggestions to add features that 
will assist in debugging that i can implement i will greatly 
appreciate it.
>

Use Log4J. (http://jakarta.apache.org/log4j) 

Log4J has something called Logging Levels, e.g. DEBUG, ERROR, INFO etc...

Let's say you have some 15 packages with some 10 classes in each.

In each class, instantiate a Logger with the statement

static Logger logger = Logger.getInstance(MyClass.class.getName());

Now within the class, write both DEBUG level statements and INFO level statements:

e.g. 

public void someTask(String first, String second){
logger.debug("just entered the someTask method, args are " + first + ":" + 
second);
logger.info("about to calculate something");
int x = calculate();
logger.debug("the calculation result was " + x);
}

Now, DEBUG levels happen to be lower in importance than INFO levels. 

Log4J can be instructed on which level to log via a properties file.
So, you can change log levels, or even disable loggin altogether via an external 
properties file. No changes to the code are required at all.

Also, you can specify that the log outputs from a particular class should be 
redirected to one file, while all other logs could go to another file, or 
even a JDBC target.


>Thanks,
>Nitin
>

Sriram


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Debugging JSPs and Servlets

2002-02-27 Thread Wagoner, Mark

Take a look at Log4j http://jakarta.apache.org/log4j/docs/index.html

It has been the greatest debugging tool I have found.

-Original Message-
From: Nitin Vira [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 12:47 PM
To: Tomcat Users List
Subject: Debugging JSPs and Servlets


Hello,

I am trying to create an environment that will assist in debugging jsps, i
think one of the basic ways to do debugging is through logging, I want to
log various request coming in along with the request parameters, i checked
the access loggs but they only logg GET request also it doesnt logg the
parameters, is there anyway i can logg POST request too along with the
request parameters, i can possibly use a filter to do it, will that be a
right approach also can i configure a filter to run for all the servlets?
Also is it possible to logg something like forwards to another page and
including other pages, also if you have any other suggestions to add
features that will assist in debugging that i can implement i will greatly
appreciate it.

Thanks,
Nitin

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Debugging JSPs and Servlets

2002-02-27 Thread Nitin Vira

Hello,

I am trying to create an environment that will assist in debugging jsps, i think one 
of the basic ways to do debugging is through logging, I want to log various request 
coming in along with the request parameters, i checked the access loggs but they only 
logg GET request also it doesnt logg the parameters, is there anyway i can logg POST 
request too along with the request parameters, i can possibly use a filter to do it, 
will that be a right approach also can i configure a filter to run for all the 
servlets? Also is it possible to logg something like forwards to another page and 
including other pages, also if you have any other suggestions to add features that 
will assist in debugging that i can implement i will greatly appreciate it.

Thanks,
Nitin

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Problems debugging JSPs

2001-08-21 Thread Rob S.

Probabaly better off on the JBuilder forums/newsgroup.  Not that you might
not get an answer back there, but @ there message boards, you're guaranteed
everyone's running JB =)

- r

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 20, 2001 11:22 AM
> To: [EMAIL PROTECTED]
> Subject: Problems debugging JSPs
>
>
> Hi,
>
> I'm experiencing some problems when trying to debug JSPs in JBuilder 5. By
> the way, I'm using Tomcat 3.2.3 under Windows NT. I've added the Java file
> generated by Jasper to my project and set a breakpoint in the
> _jspService()
> method. Then when I reload the page in my browser JBuilder 5 opens a new
> window and displays a stub source file generated from the class file by
> JBuilder's decompiler, but not the original Java file that I added to the
> project. I assume that's because JBuilder can't find the source
> file because
> it's not placed in the correct directory. The Java file generated
> by Jasper
> starts with a package declaration and even though Tomcat creates a
> corresponding subdirectory in the works directory, it places both
> source and
> class file at the top of the works directory. Does anybody know of any
> workaround or am I simply missing something?
>
> Many thanks in advance!
>
> Thomas
>




Problems debugging JSPs

2001-08-20 Thread TOellrich

Hi,

I'm experiencing some problems when trying to debug JSPs in JBuilder 5. By
the way, I'm using Tomcat 3.2.3 under Windows NT. I've added the Java file
generated by Jasper to my project and set a breakpoint in the _jspService()
method. Then when I reload the page in my browser JBuilder 5 opens a new
window and displays a stub source file generated from the class file by
JBuilder's decompiler, but not the original Java file that I added to the
project. I assume that's because JBuilder can't find the source file because
it's not placed in the correct directory. The Java file generated by Jasper
starts with a package declaration and even though Tomcat creates a
corresponding subdirectory in the works directory, it places both source and
class file at the top of the works directory. Does anybody know of any
workaround or am I simply missing something?

Many thanks in advance!

Thomas