why do we typecast ActionForm into out plain java bean
class in Action class?
Answer Posted / jagadeesh b.n
Bcoz as u all know, casting are of 2 types Upcast(implicit)
and Downcast(Explicit)in core java.....Upcasting means
converting lower datatype(int) to higher datatype(long) and
Downcast means its a viceversa of upcast...(long to int)...
As u know in struts ActionForm is a superclass where as ur
Java bean program is a simple class with private fields and
set/get methods for conversion of superclass to sublclass
we use typecasting in struts...
Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is struts framework?
What is the purpose of action-mappings tag in struct-config.xml?
Explain about logic match tag?
What is includeaction?
What is ognl?
What is the purpose of '@customvalidator'?
What is declarative exception handling in struts?
How to use dispatchaction?
Why is it called struts?
What do you mean by struts.dev mode?
What are the struts2 configuration properties that control file uploading process?
What are the components of struts?
In struts.xml, what does the attribute "method" stands for in the "action" tag?
How an actionform bean is created?
What are the differences between Struts1 and Struts2 or how Struts2 is better than Struts1?