This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes bean rules Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean rules" Watch "bean rules" New topic

bean rules

Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
Occasionaly I run into problems where struts2 is unable to take the data from my request and put it into the beans in my action class. The problem is that there is either something wrong with how I have the bean class defined or how I have the property set up. The logs don't tell me much that helps me narrow down the problem. This ends up taking me a very long time to debug. Can anyone know of a good place to find the rules that that java 6 uses for bean Introspection? I read the spec but it doesn't seem to contain all of the details. For instance, I couldn't get one of my classes to work until I gave it a zero parameter contsructor, and I don't see that in the spec (unless I'm missing it). If anyone know where to find a consise, accurate set of the rules or a good description of what is done during Introspection please let me know.

Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
How about posting your Javabean code here, without looking at your code is pretty much impossible to know where the problem might be
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
I'm not looking for help with a bug, I'm trying to find a better way to figure out when the problem that I've run into is that my bean class isn't set up correctly to work with Struts. I assume my problem is that I need to conform to Sun's bean spec, but the spec doesn't give me a very clear set of rules as to what I need to do to conform to it.
It is sorta covered in the JavaRanch Style Guide.
subject: bean rules
Similar Threads
Introspection tutorial
Connecting to Access
Rules Roundup
Home & Remote interface