I identified following issues in current struts and about to write articles to
propose solutions:
1) token management. The current implemention of token management requires
individual actions do themselves, i.e., "insert" token management code and
logic into you action classes. That is simply not good. because it couples with
yor application control code. My proposed sulotion is move the token management
code out of action hirachy, instead, put in Controller and declare whether to
use and how to use in struts-config.xml. Thus achive 100% declarative token
management.
2)Validator. the validator "float" and "long" failes when the input number has
trailing "f" and "l" respectively. the validwhen uses hard-coded variable name
"test" to indentified the expression and make it impossible to use multiple
validwhen on the same field. the validwhen fails when comapre numbers and
java.util.Date or java.sql.Date, because they are compared by the string value.
3) muti-valued action config attribute "parameter". The action config attribute
"parameter" is designed to pass additional config parameters. But it is no
longer available if you use DispatchAction, because DispatchAction monoplized
the parameter, only one single parameter that specified the method name to be
called. Reimplement getMethodName()
in DispatchAction will solve this problem. The mutilple parameters should be
pared, saved into requtest and available to action/jsps. This process should be
done in Controller, not the actions.
I have solutions for all of problems and proved works. Any one can tell me
whether any of the problems is already solved?
Xinsheng [Mike] Huang
SCJP -- Sun Certified Programmer for Java 2 Platform
SCJD -- Sun Certified Developer for Java 2 Platform
SCEA -- Sun Certified Enterprise Architect for J2EE
410-790-7462(C)
---------------------------------
Discover Yahoo!
Stay in touch with email, IM, photo sharing & more. Check it out!