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


Please Help Members By Posting Answers For Below Questions

What is struts framework?

735


What is the purpose of action-mappings tag in struct-config.xml?

766


Explain about logic match tag?

788


What is includeaction?

762


What is ognl?

813


What is the purpose of '@customvalidator'?

785


What is declarative exception handling in struts?

758


How to use dispatchaction?

769


Why is it called struts?

712


What do you mean by struts.dev mode?

707


What are the struts2 configuration properties that control file uploading process?

838


What are the components of struts?

727


In struts.xml, what does the attribute "method" stands for in the "action" tag?

721


How an actionform bean is created?

741


What are the differences between Struts1 and Struts2 or how Struts2 is better than Struts1?

790