• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between Action,ActionServlet class

 
rex tony
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between Action,ActionServlet class?
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Similarity is they both are Java classes.

But ActionServlet is nothing but a Servlet (enhanced version of Servlet) and it definitely acts as a Controller in the MVC pattern as described.

Whereas the Action class is the actual class which is acting upon the data (Model) for implementing your business logic. Using which you carry out all your business flow.

The ActionServlet is responsbile for looking up the struts-config.xml file to identify the particular action class and instantiate it if necessary, and send the actual request,response objects along with the ActionMapping,ActionForm objects to the execute() method of the invoked Action class.

Once the execute() method is done with its flow, it actually returns the ActionForward object back to the ActionServlet (which actually invoked the execute() method). The ActionServlet unwraps the ActionForward object and finds out the "key" to forward the request to the next level.

does that help?
 
deepumdk mavireddi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey raghavaan , that really helped me .. thank you so much...

and most important.. NICE Meeting you..

thanks & regards,
Dilip
 
deepumdk mavireddi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey raghavaan , that really helped me .. thank you so much...

and most important.. NICE Meeting you..

thanks & regards,
Dilip
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Pleasure dileep.

Nice meeting me? In this forum you mean to say?
 
jazy smith
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ raghavan : beautifully explained... Crystal Clear concept. I am impressed.
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jazy, do you think raghavan will read this after 2 years. The thread is 2 years old. Please Dont Wake The Zombies like this...
 
jazy smith
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ankit, It was appreciation dude. Doesn't matter when you appreciate one's work, what matters is you appreciate it. And don't forget the basic rule of this site

" BE NICE " or "LEAVE"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic