Please see http://marc.theaimsgroup.com/?l=tomcat-user&m=104258346022990&w=2 for a 
fuller explanation of the problem I have suffered for the last two weeks.

In short, my web application (with a correct directory structure, with a correct 
context specified in server.xml, with working JSP pages and a correctly coded bean) 
simply refused to see my packaged bean class 'FormBean'.  I received an HTTP 404 error 
with a jasper exception "cannot find any information on property 'uName' in a bean of 
type 'coreBeans.FormBean'.

Nobody on the user list had any solutions.  Everything looked to be correctly 
configured and coded.

Usually I use a good lightweight editor, Jext, or ActiveState's Komodo 1.2 (I know, I 
know, but I use it for Perl and what you know you tend to stick with) when writing 
java files.  However, today I started JBuilder 6 and used the bean writing features to 
inspect my bean.  I saw immediately that, despite the fact the bean was correctly 
coded, JBuilder was identifying TWO properties in it, 'uName' and 'UName'.  The latter 
was spurious.  I removed the spurious property using JBuilder's inbuilt features (i.e. 
I didn't remove it by hand, I let the IDE do it for me) and for good measure used 
JBuilder to rewrite my getter and setter properties for the real property (no, these 
weren't wrong in the first place because they worked under the '/examples' folder).  I 
also changed the property name to 'remoteUserName'.

Success!  At last my little webapp worked.  I could have jumped out of the window with 
joy, but as I'm on the first floor I curtailed the impulse.

I thought that I had simply been very unfortunate in choosing a property name, 
'uName', that was somehow invalid.  However, this is where it gets curious.  I rewrote 
my bean yet again using Komodo 1.2, this time using the property name 'remUserName'.  
I was flummoxed when, after compiling the class, I started getting the HTTP 404 error 
again.  It was not until I rewrote the bean in JBuilder a second time that I 
eradicated the error again.

The long and the short of it is I would recommend avoiding the property name 'uName'.  
I think I would also recommend not using Komodo 1.2 to write bean classes.  However, I 
would recommend using JBuilder 6 for the purpose, even if it is a bit of a large beast 
for small beans.

If anybody else out there is beating their head against their monitor because they 
have a bean in a web application that refuses to work for no good reason (and I have 
seen a few messages that indicate others have been tripped up by this problem), I hope 
this helps.  In fact, I'd be prepared to have a look at their class in JBuilder 6 and 
the entire webapp in Tomcat for them if they are really desperate.

One word of admonition; I am a newbie when it comes to Tomcat, so bear that in mind 
when considering the above.

Regards,

Wilson

- Jakarta Tomcat 4.1.18
- J2SDK1.4.0
- Win2K Pro

Reply via email to