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

List the important attribute and elements of action mapping under struts.

521


What kind of mvc is struts 2?

549


Briefly tell the two kinds of form beans.

551


What is the difference between struts1 and struts2?

510


What is the purpose of @beforeresult?

599






What are the core classes of struts?

555


What are pull and push mvc architecture and which architecture does struts2 follow?

499


What is the configuration files used in struts?

519


In how many ways duplicate form submission can occurs?

560


What are the Core classes of Struts Framework?

577


How to convert struts to spring mvc?

524


What is the differences between struts1 and struts2?

521


Is struts action class singleton?

541


Which file is used by controller to get mapping information for request routing?

527


What is difference between actionform and dynaactionform?

585