Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


why do we typecast ActionForm into out plain java bean
class in Action class?

Answers were Sorted based on User's Feedback



why do we typecast ActionForm into out plain java bean class in Action class?..

Answer / 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

why do we typecast ActionForm into out plain java bean class in Action class?..

Answer / ravikiran(aptech mumbai)

Because The methods what we declared in a bean are not of
type ActionForm class type that's why we are type casting
and calling our getters and setters

Is This Answer Correct ?    3 Yes 2 No

why do we typecast ActionForm into out plain java bean class in Action class?..

Answer / santhoshkumar.shaik

ok here our our form data in ActionForm
that's y u shoud do down Type Cast
othere wise u can n't use

Is This Answer Correct ?    0 Yes 2 No

why do we typecast ActionForm into out plain java bean class in Action class?..

Answer / balaji

Bcoz this will tell that our form bean is an action form
bean which will refer to which action it is referred from
strutsconfig.xml file


10x
balaji

Is This Answer Correct ?    1 Yes 4 No

why do we typecast ActionForm into out plain java bean class in Action class?..

Answer / johndoe

Acctually not realy thinking you should ask that, i mean
well ask, the answer is: to use it's methods.

But to understand it i recomend reading something about
polymorphy which explains why we're casting the action-
form, hope i understood right.

Regards
Jan

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More Struts Interview Questions

At the point, you should go for struts framework?

0 Answers  


What is the differnce between 2-tier architecture and 3- tier architecture in java?

3 Answers  


What is the purpose of '@keyproperty'?

0 Answers  


How you will make available any message resources definitions file to the struts framework environment?

0 Answers  


struts comes under which layer of three tire architecture in real time projects plz i need explaination?

10 Answers   Infinite Computer Solutions, TCS,


What is the difference between validation.xml and validator-rules.xml files in struts?

0 Answers  


In how many ways duplicate form submission can occurs?

0 Answers  


Explain about token feature in struts?

0 Answers   Tech Mahindra,


What is spring hibernate and struts in java?

0 Answers  


What is Struts Frame Work Architecture(With Diagram) ?

2 Answers   CMC, Wipro,


How action mapping is configured in Struts?

0 Answers  


What is the purpose of global-forwards tag in struct-config.xml?

0 Answers  


Categories