struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ADH" <andrew.david.h...@gridnode.com>
Subject I killed the (tom)cat
Date Wed, 24 Apr 2002 15:28:23 GMT
Im still new to struts so Ive yet to encounter most of the 'gotchas'
involved, but this problem seems a bit 'unusual'.
Ive got a custom tag (intended to be similar to the html:text field tag only
with some options to make my life easier generating my html forms) which is
trying to obtain the action form bean from the request scope (with the
intent of obtaining a field property to populate an html input element).
Its failing on the call to get the bean and throwing an exception in the
method that does this. I catch this exception inside the method and ignore
it, but somewhere after this point tomcat (4.0.3, running standalone on
win2k) is dying (but not always. (such as right now when im trying to get
more info to add to my post. sigh...)). The batch file window changes to
read "Select Tomcat" and attempts to load pages in the browser just hang. No
exceptions are reported in the log, or the batch file window (other than my
"nobean" line).
Im probably just doing something stupid somewhere , however my brain is not
at peak efficiency right now (Ive done 110 hours in the last 10 days. So
much for XPs 40hr week!) so I figured Id ask if anyone here has any idea why
it might do this?

BeanName is Constants.BEAN_KEY
getName() returns the name of the property in the action form bean (ie:
username)

private String getValue()
  {
    String bN = getBeanName();
    if(bN == null) return "";
    Object bean = pageContext.getRequest().getAttribute(bN);
    try
    {
      String value = (String)PropertyUtils.getSimpleProperty(bean,
getName());
      if(value != null)
        return value;
      else
        return "";
    }
    catch(Exception e)
    {
      System.out.println("nobean");
      return "";
	//somewhere after here tomcat is tomcatatonic...
    }
  }


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


Mime
View raw message