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 Struts2?
What is ognl?
What are interceptors in struts 2?
How do u provide security to ur project?(Banking domain project)
What is the role of action class in struts?
Explain about the library tag?
What is the use of resourcebundle.properties file in Struts Validation framework?
What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?
What is the use of interceptor?
What is the use of reset method of ActionForm class?
What is the purpose of action tag in struts.xml?
What is apache struts framework?
What is the purpose of @beforeresult annotation?
What is pojo in struts2?
For a single Struts application, can we have multiple struts-config.xml files?