GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Struts
Go To First  |  Previous Question  |  Next Question 
 Struts  |  Question 85 of 103    Print  
Is Action class is Servlet or Not ? if yes why ?

  
Total Answers and Comments: 10 Last Update: June 09, 2008     Asked by: enjoy 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: _Neo_
 
In Struts1, Action Servlet is a servelet (since it extends HTTPServle) but Action class extents org.apache.struts.action.Action which has nothing to do with Servlet.

In Struts2, Action class extends com.opensymphony.xwork2.ActionSupport which has nothing to do with Servlet.

So, to answer the question, Action class is not a Servlet by any logic.

Above answer was rated as good by the following members:
pradeepkmr18, pradeep_rmk, dala.prasad
April 13, 2007 18:53:25   
KidJava        

RE: Is Action class is Servlet or Not ? if yes why ?

Nope !!


 
Is this answer useful? Yes | No
November 27, 2007 12:19:07   
Charles        

RE: Is Action class is Servlet or Not ? if yes why ?
Judging by the rules of inheritence i would say that Action class is a Servlet.
 
Is this answer useful? Yes | No
December 07, 2007 05:31:27   
pdommara Member Since: September 2007   Contribution: 15    

RE: Is Action class is Servlet or Not ? if yes why ?
Servlet !!
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
January 02, 2008 10:27:56   
ashok99 Member Since: January 2008   Contribution: 1    

RE: Is Action class is Servlet or Not ? if yes why ?
No!!! Action class is not a servlet. it may resemble like Servlet since it is using HttpServletRequest and HttpServletResponse but actually its a plain java class which is been called/Managed by a well defined framework called Struts.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
January 09, 2008 19:09:17   
_Neo_ Member Since: January 2008   Contribution: 1    

RE: Is Action class is Servlet or Not ? if yes why ?
In Struts1 Action Servlet is a servelet (since it extends HTTPServle) but Action class extents org.apache.struts.action.Action which has nothing to do with Servlet.

In Struts2 Action class extends com.opensymphony.xwork2.ActionSupport which has nothing to do with Servlet.

So to answer the question Action class is not a Servlet by any logic.

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
January 23, 2008 00:49:57   
koseavase Member Since: January 2008   Contribution: 5    

RE: Is Action class is Servlet or Not ? if yes why ?

Action Servlet is a Servlet - no doubt about it



 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    
January 23, 2008 03:52:00   
koseavase Member Since: January 2008   Contribution: 5    

RE: Is Action class is Servlet or Not ? if yes why ?

Sorry Action class is not a Serlvet
Any doubts go to eclipse and view the source code for Action class


 
Is this answer useful? Yes | No
April 02, 2008 15:55:47   
meshram.anurag Member Since: April 2008   Contribution: 1    

RE: Is Action class is Servlet or Not ? if yes why ?
No Action class is not a Servlet. Servlet is a helper application of the web server to produce dynamic content to the client. And Action class is also made for the same.
 
Is this answer useful? Yes | No
May 30, 2008 03:08:26   
khadarzone Member Since: September 2007   Contribution: 17    

RE: Is Action class is Servlet or Not ? if yes why ?
No Action Class is not a servlet Because it is not a subclass of javax.servlet.GenericServlet. An ActionServlet calls the execute() method of an ActionClass().
 
Is this answer useful? Yes | No
June 09, 2008 01:10:52   
pradeepkmr18 Member Since: June 2008   Contribution: 25    

RE: Is Action class is Servlet or Not ? if yes why ?
Action class is not a Servlet .
Any Java object which extends the functionality of servlet interface or HttpServlet or GenericServlet or it is subclass can be called as a servlet but our action class does not extend any of these.
For clarification go to web.xml there we have to define all the servlets. You will not find Action class bec it is not a servlet.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape