RE: Question on Struts debugging - one more time

2002-01-15 Thread Keith Bacon

I don't use a proper IDE, I'm waiting till it's clear they are very good  I
can get a fast response time. So some of what I said was in ignorance, but also many 
people don't
use IDE's yet.
I don't have time to keep trying them out - last year I tried, they clearly needed a 
monster
computer to run. 
Is netbeans the best IDE?
Are you happy with it?
What sized machine to run on? 
Keith.



--- Sandeep Takhar [EMAIL PROTECTED] wrote:
 I am not sure what is implied by the below messages:
 
 Using netbeans I am able to 
 
 debug servlets
 debug jsp's (a little buggy but it works)
 debug action classes and form classes.
 
 I am not sure if this all works remotely or not.
 
 logging is always a good idea.
 
 Sandeep
 --- Kilmer, Erich [EMAIL PROTECTED]
 wrote:
  Hi Keith,
  Thanks for your reply.
  I do use already many of the techniques listed in
  your email as well as
  log4j.
  I do not have any problem catching errors in form
  and actions classes.
  I do have problem finding errors that come out of
  the html tags in JSPs.
  If there is a bad mapping and an html:form's action
  point to the mapping
  with a problem I do not see any errors in any of the
  logs. I have modified
  my error.jsp in hopes of seeing more but so far
  nothing.
  If I have better luck with this I will let the group
  know.
  Developing in Struts would be much faster if there
  was a way to diagnose
  such problems.
  Erich
  
  -Original Message-
  From: Keith Bacon
  [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 09, 2002 8:54 AM
  To: Struts Users Mailing List
  Subject: Re: Question on Struts debugging - one more
  time
  
  
  I've not had better luck. I think it's the way it
  is.
  Here's how I do it - I'd like to know how others do.
  
  I use hundreds of log messages so I can trace the
  flow of my program. I make
  the method calls for
  logging easy to type - dbmd(a debug msg) or
  dbmw(warning message).
  I code traces into action classes from the start. to
  show the perform method
  starting  ending so
  a dud struts config is found because the Action i
  expect to run doesn't log
  it's start. 
  I check for null pointers all over the place  log a
  warning or throw an
  exception for them.
  I constantly restart the server (tomcat 3.2.2) to
  make weird problems go
  away.
  Auto class reloading doesn't work properly so - I
  restart after every
  compile.
  
  I use these 3 methods in jsp's  Action classes a
  lot, to check the contents
  of the session 
  request - this finds things left in the session by
  mistake.
  public static void
  printSessionAttributeNames(String caller,
  HttpSession session) {
  public static void
  printRequestAttributeNames(String caller,
  HttpServletRequest request) {
  public static void printRequestParameters(String
  caller,
  HttpServletRequest request) {
  I've attached the code for them, someone may find
  them useful - the codes a
  bit dodgy  old but
  it's easy to understand.
  
  I have my own logging code (from old servlet
  programming) but I want to use
  log4j (one day!) - You
  really need to be able to switch trace messages
  on/off without re-compiling
  classes or restarting
  the server.
  
  Only when it's quite reliable do I remove the
  messages. Often I just comment
  the mesages out in
  expectation it will go wrong in future.
  
  All in all a bit primitive compared to some
  (non-web) environments I've
  worked in. we're in the
  early days - things will get easier. We'll get
  informative/instructive
  messages that tell us what
  to do to put it right  we'll be able to step thru
  our action classes in the
  debugger.
  
  Happy bug hunting! - Keith
  
  
  --- Kilmer, Erich
  [EMAIL PROTECTED] wrote:
   Thought I would give this one more try. Has anyone
  had better luck with
   debugging problems caused by say bad action
  mappings, ie: mis-named action
   classes, missing action forms etc. Currently when
  these problems are
   encountered I see no useful error messages in any
  of my logs (even when
   debug is set to 2). 
   Is this just the way that it is or have I failed
  to do something?
   
   Thanks,
   Erich
   
   Sent previously:
   
   I have been using Struts for some time now. My
  app's Struts config file
  has
   almost 50 action mappings so I have been down this
  road a time or two. 
   Many times when adding a new mapping I run into
  errors though. For example
   the latest on was where the mapping listed an
  action class called
  something
   like UserCreateAction (package removed). But when
  I wrote the class itself
  I
   named it UserAddAction.
   Now when I built the app and moved to the Orion
  apps server and ran it
  when
   I get to the JSP that references this action
  mapping I get a null
  exception.
   Typically I do not catch exceptions in a JSP and
  the uncaught exceptions
  go
   to my error JSP where it states that the exception
  is null.
   So I go into my web.xml file and change

RE: Question on Struts debugging - one more time

2002-01-15 Thread Rick Horowitz

I tried switching from JBuilder to NetBeans but found
NetBeans too slow - on a 400Mhz XEON with 512MB RAM.
I've switched back to JBuilder Personal. The JB 6.0
release now installs easily on Redhat 7.2 (unlike the
5.0 release, which I never got working). NetBeans has
more functionality than the free version of JB
(Personal - used to be Foundation), but the speed
difference is too much for me to ignore. I'm planning
to try NB again with their 3.4 version.


--- Keith Bacon [EMAIL PROTECTED] wrote:
 I don't use a proper IDE, I'm waiting till it's
 clear they are very good  I
 can get a fast response time. So some of what I said
 was in ignorance, but also many people don't
 use IDE's yet.
 I don't have time to keep trying them out - last
 year I tried, they clearly needed a monster
 computer to run. 
 Is netbeans the best IDE?
 Are you happy with it?
 What sized machine to run on? 
 Keith.
 
 
 
 --- Sandeep Takhar [EMAIL PROTECTED] wrote:
  I am not sure what is implied by the below
 messages:
  
  Using netbeans I am able to 
  
  debug servlets
  debug jsp's (a little buggy but it works)
  debug action classes and form classes.
  
  I am not sure if this all works remotely or not.
  
  logging is always a good idea.
  
  Sandeep
  --- Kilmer, Erich
 [EMAIL PROTECTED]
  wrote:
   Hi Keith,
   Thanks for your reply.
   I do use already many of the techniques listed
 in
   your email as well as
   log4j.
   I do not have any problem catching errors in
 form
   and actions classes.
   I do have problem finding errors that come out
 of
   the html tags in JSPs.
   If there is a bad mapping and an html:form's
 action
   point to the mapping
   with a problem I do not see any errors in any of
 the
   logs. I have modified
   my error.jsp in hopes of seeing more but so far
   nothing.
   If I have better luck with this I will let the
 group
   know.
   Developing in Struts would be much faster if
 there
   was a way to diagnose
   such problems.
   Erich
   
   -Original Message-
   From: Keith Bacon
   [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, January 09, 2002 8:54 AM
   To: Struts Users Mailing List
   Subject: Re: Question on Struts debugging - one
 more
   time
   
   
   I've not had better luck. I think it's the way
 it
   is.
   Here's how I do it - I'd like to know how others
 do.
   
   I use hundreds of log messages so I can trace
 the
   flow of my program. I make
   the method calls for
   logging easy to type - dbmd(a debug msg) or
   dbmw(warning message).
   I code traces into action classes from the
 start. to
   show the perform method
   starting  ending so
   a dud struts config is found because the Action
 i
   expect to run doesn't log
   it's start. 
   I check for null pointers all over the place 
 log a
   warning or throw an
   exception for them.
   I constantly restart the server (tomcat 3.2.2)
 to
   make weird problems go
   away.
   Auto class reloading doesn't work properly so -
 I
   restart after every
   compile.
   
   I use these 3 methods in jsp's  Action classes
 a
   lot, to check the contents
   of the session 
   request - this finds things left in the session
 by
   mistake.
 public static void
   printSessionAttributeNames(String caller,
   HttpSession session) {
 public static void
   printRequestAttributeNames(String caller,
   HttpServletRequest request) {
 public static void
 printRequestParameters(String
   caller,
   HttpServletRequest request) {
   I've attached the code for them, someone may
 find
   them useful - the codes a
   bit dodgy  old but
   it's easy to understand.
   
   I have my own logging code (from old servlet
   programming) but I want to use
   log4j (one day!) - You
   really need to be able to switch trace messages
   on/off without re-compiling
   classes or restarting
   the server.
   
   Only when it's quite reliable do I remove the
   messages. Often I just comment
   the mesages out in
   expectation it will go wrong in future.
   
   All in all a bit primitive compared to some
   (non-web) environments I've
   worked in. we're in the
   early days - things will get easier. We'll get
   informative/instructive
   messages that tell us what
   to do to put it right  we'll be able to step
 thru
   our action classes in the
   debugger.
   
   Happy bug hunting! - Keith
   
   
   --- Kilmer, Erich
   [EMAIL PROTECTED] wrote:
Thought I would give this one more try. Has
 anyone
   had better luck with
debugging problems caused by say bad action
   mappings, ie: mis-named action
classes, missing action forms etc. Currently
 when
   these problems are
encountered I see no useful error messages in
 any
   of my logs (even when
debug is set to 2). 
Is this just the way that it is or have I
 failed
   to do something?

Thanks,
Erich

Sent previously:

I have been using Struts for some time now. My
   app's Struts config file
   has
almost 50 action mappings so I

Re: Question on Struts debugging - one more time

2002-01-15 Thread dion

Rick Horowitz wrote:

 I tried switching from JBuilder to NetBeans but found
 NetBeans too slow - on a 400Mhz XEON with 512MB RAM.


I'm running a PIII 1Ghz with 512MB on Mandrake and NB 3.3 is fine for 
meI've also had Eclipse running on it, but at the moment Eclipse is 
'flakier' than NB by a long way.


 I've switched back to JBuilder Personal. The JB 6.0
 release now installs easily on Redhat 7.2 (unlike the
 5.0 release, which I never got working). NetBeans has
 more functionality than the free version of JB
 (Personal - used to be Foundation), but the speed
 difference is too much for me to ignore. I'm planning
 to try NB again with their 3.4 version.
 
 
 --- Keith Bacon [EMAIL PROTECTED] wrote:
 
I don't use a proper IDE, I'm waiting till it's
clear they are very good  I
can get a fast response time. So some of what I said
was in ignorance, but also many people don't
use IDE's yet.
I don't have time to keep trying them out - last
year I tried, they clearly needed a monster
computer to run. 
Is netbeans the best IDE?
Are you happy with it?
What sized machine to run on? 
Keith.
[snippity]



-- 
dIon Gillard, Multitask Consulting
http://www.multitask.com.au/developers


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




RE: Question on Struts debugging - one more time

2002-01-15 Thread Sandeep Takhar

I am quite happy with it.  

There is some time in figuring out configuration
issues and searching through mailing lists.  But if
you're reading this one...

I have 256 ram and and p4 @home, 500 ram and p1 here
at work -- both work sufficiently well.  Being able to
see what is being debugged is important for me and I
will take a little hit in performance if necessary,
but I haven't noticed it being overly slow anyways.

I have used visual age in the past, but prefer
netbeans.  Nice thing about netbeans is you can get it
for free and download it at home with no problem.

CVS and ant are also being used here and I find them
invaluable as well.

Sandeep
--- Rick Horowitz [EMAIL PROTECTED] wrote:
 I tried switching from JBuilder to NetBeans but
 found
 NetBeans too slow - on a 400Mhz XEON with 512MB RAM.
 I've switched back to JBuilder Personal. The JB 6.0
 release now installs easily on Redhat 7.2 (unlike
 the
 5.0 release, which I never got working). NetBeans
 has
 more functionality than the free version of JB
 (Personal - used to be Foundation), but the speed
 difference is too much for me to ignore. I'm
 planning
 to try NB again with their 3.4 version.
 
 
 --- Keith Bacon [EMAIL PROTECTED] wrote:
  I don't use a proper IDE, I'm waiting till it's
  clear they are very good  I
  can get a fast response time. So some of what I
 said
  was in ignorance, but also many people don't
  use IDE's yet.
  I don't have time to keep trying them out - last
  year I tried, they clearly needed a monster
  computer to run. 
  Is netbeans the best IDE?
  Are you happy with it?
  What sized machine to run on? 
  Keith.
  
  
  
  --- Sandeep Takhar [EMAIL PROTECTED]
 wrote:
   I am not sure what is implied by the below
  messages:
   
   Using netbeans I am able to 
   
   debug servlets
   debug jsp's (a little buggy but it works)
   debug action classes and form classes.
   
   I am not sure if this all works remotely or not.
   
   logging is always a good idea.
   
   Sandeep
   --- Kilmer, Erich
  [EMAIL PROTECTED]
   wrote:
Hi Keith,
Thanks for your reply.
I do use already many of the techniques listed
  in
your email as well as
log4j.
I do not have any problem catching errors in
  form
and actions classes.
I do have problem finding errors that come out
  of
the html tags in JSPs.
If there is a bad mapping and an html:form's
  action
point to the mapping
with a problem I do not see any errors in any
 of
  the
logs. I have modified
my error.jsp in hopes of seeing more but so
 far
nothing.
If I have better luck with this I will let the
  group
know.
Developing in Struts would be much faster if
  there
was a way to diagnose
such problems.
Erich

-Original Message-
From: Keith Bacon
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 8:54 AM
To: Struts Users Mailing List
Subject: Re: Question on Struts debugging -
 one
  more
time


I've not had better luck. I think it's the way
  it
is.
Here's how I do it - I'd like to know how
 others
  do.

I use hundreds of log messages so I can trace
  the
flow of my program. I make
the method calls for
logging easy to type - dbmd(a debug msg) or
dbmw(warning message).
I code traces into action classes from the
  start. to
show the perform method
starting  ending so
a dud struts config is found because the
 Action
  i
expect to run doesn't log
it's start. 
I check for null pointers all over the place 
  log a
warning or throw an
exception for them.
I constantly restart the server (tomcat 3.2.2)
  to
make weird problems go
away.
Auto class reloading doesn't work properly so
 -
  I
restart after every
compile.

I use these 3 methods in jsp's  Action
 classes
  a
lot, to check the contents
of the session 
request - this finds things left in the
 session
  by
mistake.
public static void
printSessionAttributeNames(String caller,
HttpSession session) {
public static void
printRequestAttributeNames(String caller,
HttpServletRequest request) {
public static void
  printRequestParameters(String
caller,
HttpServletRequest request) {
I've attached the code for them, someone may
  find
them useful - the codes a
bit dodgy  old but
it's easy to understand.

I have my own logging code (from old servlet
programming) but I want to use
log4j (one day!) - You
really need to be able to switch trace
 messages
on/off without re-compiling
classes or restarting
the server.

Only when it's quite reliable do I remove the
messages. Often I just comment
the mesages out in
expectation it will go wrong in future.

All in all a bit primitive compared to some
(non-web) environments I've
worked in. we're

RE: Question on Struts debugging - one more time

2002-01-13 Thread Sandeep Takhar

I am not sure what is implied by the below messages:

Using netbeans I am able to 

debug servlets
debug jsp's (a little buggy but it works)
debug action classes and form classes.

I am not sure if this all works remotely or not.

logging is always a good idea.

Sandeep
--- Kilmer, Erich [EMAIL PROTECTED]
wrote:
 Hi Keith,
 Thanks for your reply.
 I do use already many of the techniques listed in
 your email as well as
 log4j.
 I do not have any problem catching errors in form
 and actions classes.
 I do have problem finding errors that come out of
 the html tags in JSPs.
 If there is a bad mapping and an html:form's action
 point to the mapping
 with a problem I do not see any errors in any of the
 logs. I have modified
 my error.jsp in hopes of seeing more but so far
 nothing.
 If I have better luck with this I will let the group
 know.
 Developing in Struts would be much faster if there
 was a way to diagnose
 such problems.
 Erich
 
 -Original Message-
 From: Keith Bacon
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 09, 2002 8:54 AM
 To: Struts Users Mailing List
 Subject: Re: Question on Struts debugging - one more
 time
 
 
 I've not had better luck. I think it's the way it
 is.
 Here's how I do it - I'd like to know how others do.
 
 I use hundreds of log messages so I can trace the
 flow of my program. I make
 the method calls for
 logging easy to type - dbmd(a debug msg) or
 dbmw(warning message).
 I code traces into action classes from the start. to
 show the perform method
 starting  ending so
 a dud struts config is found because the Action i
 expect to run doesn't log
 it's start. 
 I check for null pointers all over the place  log a
 warning or throw an
 exception for them.
 I constantly restart the server (tomcat 3.2.2) to
 make weird problems go
 away.
 Auto class reloading doesn't work properly so - I
 restart after every
 compile.
 
 I use these 3 methods in jsp's  Action classes a
 lot, to check the contents
 of the session 
 request - this finds things left in the session by
 mistake.
   public static void
 printSessionAttributeNames(String caller,
 HttpSession session) {
   public static void
 printRequestAttributeNames(String caller,
 HttpServletRequest request) {
   public static void printRequestParameters(String
 caller,
 HttpServletRequest request) {
 I've attached the code for them, someone may find
 them useful - the codes a
 bit dodgy  old but
 it's easy to understand.
 
 I have my own logging code (from old servlet
 programming) but I want to use
 log4j (one day!) - You
 really need to be able to switch trace messages
 on/off without re-compiling
 classes or restarting
 the server.
 
 Only when it's quite reliable do I remove the
 messages. Often I just comment
 the mesages out in
 expectation it will go wrong in future.
 
 All in all a bit primitive compared to some
 (non-web) environments I've
 worked in. we're in the
 early days - things will get easier. We'll get
 informative/instructive
 messages that tell us what
 to do to put it right  we'll be able to step thru
 our action classes in the
 debugger.
 
 Happy bug hunting! - Keith
 
 
 --- Kilmer, Erich
 [EMAIL PROTECTED] wrote:
  Thought I would give this one more try. Has anyone
 had better luck with
  debugging problems caused by say bad action
 mappings, ie: mis-named action
  classes, missing action forms etc. Currently when
 these problems are
  encountered I see no useful error messages in any
 of my logs (even when
  debug is set to 2). 
  Is this just the way that it is or have I failed
 to do something?
  
  Thanks,
  Erich
  
  Sent previously:
  
  I have been using Struts for some time now. My
 app's Struts config file
 has
  almost 50 action mappings so I have been down this
 road a time or two. 
  Many times when adding a new mapping I run into
 errors though. For example
  the latest on was where the mapping listed an
 action class called
 something
  like UserCreateAction (package removed). But when
 I wrote the class itself
 I
  named it UserAddAction.
  Now when I built the app and moved to the Orion
 apps server and ran it
 when
  I get to the JSP that references this action
 mapping I get a null
 exception.
  Typically I do not catch exceptions in a JSP and
 the uncaught exceptions
 go
  to my error JSP where it states that the exception
 is null.
  So I go into my web.xml file and change the debug
 param to 2. I also
 changed
  detail to 2. (By the way what does detail = 2 do?)
  Then I re-ran everything after rebuilding and
 re-deploying. The app still
  does the same thing.
  OK, fine now I go to check the logs. I check the
 apps server log where
  system outs go. I see no Struts messages except
 for the flurry of them at
  startup. I look at the log4j error logs and see
 nothing. I also looked at
  the apps servers application log where I see some
 Struts messages but see
  nothing about this error.
  
  So my Struts debugging question is this. Are
 errors encountered

Re: Question on Struts debugging - one more time

2002-01-09 Thread Keith Bacon

I've not had better luck. I think it's the way it is.
Here's how I do it - I'd like to know how others do.

I use hundreds of log messages so I can trace the flow of my program. I make the 
method calls for
logging easy to type - dbmd(a debug msg) or dbmw(warning message).
I code traces into action classes from the start. to show the perform method starting 
 ending so
a dud struts config is found because the Action i expect to run doesn't log it's 
start. 
I check for null pointers all over the place  log a warning or throw an exception for 
them.
I constantly restart the server (tomcat 3.2.2) to make weird problems go away.
Auto class reloading doesn't work properly so - I restart after every compile.

I use these 3 methods in jsp's  Action classes a lot, to check the contents of the 
session 
request - this finds things left in the session by mistake.
public static void printSessionAttributeNames(String caller, HttpSession 
session) {
public static void printRequestAttributeNames(String caller, 
HttpServletRequest request) {
public static void printRequestParameters(String caller, HttpServletRequest 
request) {
I've attached the code for them, someone may find them useful - the codes a bit dodgy 
 old but
it's easy to understand.

I have my own logging code (from old servlet programming) but I want to use log4j (one 
day!) - You
really need to be able to switch trace messages on/off without re-compiling classes or 
restarting
the server.

Only when it's quite reliable do I remove the messages. Often I just comment the 
mesages out in
expectation it will go wrong in future.

All in all a bit primitive compared to some (non-web) environments I've worked in. 
we're in the
early days - things will get easier. We'll get informative/instructive messages that 
tell us what
to do to put it right  we'll be able to step thru our action classes in the debugger.

Happy bug hunting! - Keith


--- Kilmer, Erich [EMAIL PROTECTED] wrote:
 Thought I would give this one more try. Has anyone had better luck with
 debugging problems caused by say bad action mappings, ie: mis-named action
 classes, missing action forms etc. Currently when these problems are
 encountered I see no useful error messages in any of my logs (even when
 debug is set to 2). 
 Is this just the way that it is or have I failed to do something?
 
 Thanks,
 Erich
 
 Sent previously:
 
 I have been using Struts for some time now. My app's Struts config file has
 almost 50 action mappings so I have been down this road a time or two. 
 Many times when adding a new mapping I run into errors though. For example
 the latest on was where the mapping listed an action class called something
 like UserCreateAction (package removed). But when I wrote the class itself I
 named it UserAddAction.
 Now when I built the app and moved to the Orion apps server and ran it when
 I get to the JSP that references this action mapping I get a null exception.
 Typically I do not catch exceptions in a JSP and the uncaught exceptions go
 to my error JSP where it states that the exception is null.
 So I go into my web.xml file and change the debug param to 2. I also changed
 detail to 2. (By the way what does detail = 2 do?)
 Then I re-ran everything after rebuilding and re-deploying. The app still
 does the same thing.
 OK, fine now I go to check the logs. I check the apps server log where
 system outs go. I see no Struts messages except for the flurry of them at
 startup. I look at the log4j error logs and see nothing. I also looked at
 the apps servers application log where I see some Struts messages but see
 nothing about this error.
 
 So my Struts debugging question is this. Are errors encountered when
 converting the Struts tags in my JSP written anywhere? Is there more debug
 settings I must make? Is there another log that I can check?
 
 I know this is a fairly simple example and I am getting better at debugging
 them but it would be nice if there was someway to make this so I check the
 log and it says that Action class UserCreateAction does not exist. 
 
 Let me know,
 Erich Kilmer
 Bell+Howell
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[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]
 


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/


//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public static void printSessionAttributeNames(String caller, HttpSession 
session) {
Enumeration ee3 = session.getAttributeNames();
dbmd(printSessionAttributeNames: for caller: + caller + -start...);
while (ee3.hasMoreElements()) {
String name = (String)ee3.nextElement();
Object object = 

RE: Question on Struts debugging - one more time

2002-01-09 Thread Kilmer, Erich

Hi Keith,
Thanks for your reply.
I do use already many of the techniques listed in your email as well as
log4j.
I do not have any problem catching errors in form and actions classes.
I do have problem finding errors that come out of the html tags in JSPs.
If there is a bad mapping and an html:form's action point to the mapping
with a problem I do not see any errors in any of the logs. I have modified
my error.jsp in hopes of seeing more but so far nothing.
If I have better luck with this I will let the group know.
Developing in Struts would be much faster if there was a way to diagnose
such problems.
Erich

-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 8:54 AM
To: Struts Users Mailing List
Subject: Re: Question on Struts debugging - one more time


I've not had better luck. I think it's the way it is.
Here's how I do it - I'd like to know how others do.

I use hundreds of log messages so I can trace the flow of my program. I make
the method calls for
logging easy to type - dbmd(a debug msg) or dbmw(warning message).
I code traces into action classes from the start. to show the perform method
starting  ending so
a dud struts config is found because the Action i expect to run doesn't log
it's start. 
I check for null pointers all over the place  log a warning or throw an
exception for them.
I constantly restart the server (tomcat 3.2.2) to make weird problems go
away.
Auto class reloading doesn't work properly so - I restart after every
compile.

I use these 3 methods in jsp's  Action classes a lot, to check the contents
of the session 
request - this finds things left in the session by mistake.
public static void printSessionAttributeNames(String caller,
HttpSession session) {
public static void printRequestAttributeNames(String caller,
HttpServletRequest request) {
public static void printRequestParameters(String caller,
HttpServletRequest request) {
I've attached the code for them, someone may find them useful - the codes a
bit dodgy  old but
it's easy to understand.

I have my own logging code (from old servlet programming) but I want to use
log4j (one day!) - You
really need to be able to switch trace messages on/off without re-compiling
classes or restarting
the server.

Only when it's quite reliable do I remove the messages. Often I just comment
the mesages out in
expectation it will go wrong in future.

All in all a bit primitive compared to some (non-web) environments I've
worked in. we're in the
early days - things will get easier. We'll get informative/instructive
messages that tell us what
to do to put it right  we'll be able to step thru our action classes in the
debugger.

Happy bug hunting! - Keith


--- Kilmer, Erich [EMAIL PROTECTED] wrote:
 Thought I would give this one more try. Has anyone had better luck with
 debugging problems caused by say bad action mappings, ie: mis-named action
 classes, missing action forms etc. Currently when these problems are
 encountered I see no useful error messages in any of my logs (even when
 debug is set to 2). 
 Is this just the way that it is or have I failed to do something?
 
 Thanks,
 Erich
 
 Sent previously:
 
 I have been using Struts for some time now. My app's Struts config file
has
 almost 50 action mappings so I have been down this road a time or two. 
 Many times when adding a new mapping I run into errors though. For example
 the latest on was where the mapping listed an action class called
something
 like UserCreateAction (package removed). But when I wrote the class itself
I
 named it UserAddAction.
 Now when I built the app and moved to the Orion apps server and ran it
when
 I get to the JSP that references this action mapping I get a null
exception.
 Typically I do not catch exceptions in a JSP and the uncaught exceptions
go
 to my error JSP where it states that the exception is null.
 So I go into my web.xml file and change the debug param to 2. I also
changed
 detail to 2. (By the way what does detail = 2 do?)
 Then I re-ran everything after rebuilding and re-deploying. The app still
 does the same thing.
 OK, fine now I go to check the logs. I check the apps server log where
 system outs go. I see no Struts messages except for the flurry of them at
 startup. I look at the log4j error logs and see nothing. I also looked at
 the apps servers application log where I see some Struts messages but see
 nothing about this error.
 
 So my Struts debugging question is this. Are errors encountered when
 converting the Struts tags in my JSP written anywhere? Is there more debug
 settings I must make? Is there another log that I can check?
 
 I know this is a fairly simple example and I am getting better at
debugging
 them but it would be nice if there was someway to make this so I check the
 log and it says that Action class UserCreateAction does not exist. 
 
 Let me know,
 Erich Kilmer
 Bell+Howell
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED

Question on Struts debugging - one more time

2002-01-08 Thread Kilmer, Erich

Thought I would give this one more try. Has anyone had better luck with
debugging problems caused by say bad action mappings, ie: mis-named action
classes, missing action forms etc. Currently when these problems are
encountered I see no useful error messages in any of my logs (even when
debug is set to 2). 
Is this just the way that it is or have I failed to do something?

Thanks,
Erich

Sent previously:

I have been using Struts for some time now. My app's Struts config file has
almost 50 action mappings so I have been down this road a time or two. 
Many times when adding a new mapping I run into errors though. For example
the latest on was where the mapping listed an action class called something
like UserCreateAction (package removed). But when I wrote the class itself I
named it UserAddAction.
Now when I built the app and moved to the Orion apps server and ran it when
I get to the JSP that references this action mapping I get a null exception.
Typically I do not catch exceptions in a JSP and the uncaught exceptions go
to my error JSP where it states that the exception is null.
So I go into my web.xml file and change the debug param to 2. I also changed
detail to 2. (By the way what does detail = 2 do?)
Then I re-ran everything after rebuilding and re-deploying. The app still
does the same thing.
OK, fine now I go to check the logs. I check the apps server log where
system outs go. I see no Struts messages except for the flurry of them at
startup. I look at the log4j error logs and see nothing. I also looked at
the apps servers application log where I see some Struts messages but see
nothing about this error.

So my Struts debugging question is this. Are errors encountered when
converting the Struts tags in my JSP written anywhere? Is there more debug
settings I must make? Is there another log that I can check?

I know this is a fairly simple example and I am getting better at debugging
them but it would be nice if there was someway to make this so I check the
log and it says that Action class UserCreateAction does not exist. 

Let me know,
Erich Kilmer
Bell+Howell



--
To unsubscribe, e-mail:
mailto:[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]