Question:
What is the difference between a normal servlet and action servlet?
Answer:
Both a normal servlet and action sevlet are same, which extend HttpServlet and implement the servlet lifecycle methods.. Source: CoolInterview.com
we will define the action servlet in web.xml and <url-pattern> as *.do for mapping the requests which ends with .do , but we dont write the doget and dopost methods as we write in normal servlets. Main function of action servlet is to process the request and forward it to appropriate action class (*.do). Source: CoolInterview.com
Answered by: Raghu J | Date: 7/8/2009
| Contact Raghu J
Normal Servlet and Action servlet are same but Action servlet consists of logic for forwarding the request to corresponding action class Source: CoolInterview.com
Answered by: Balu R | Date: 10/2/2009
| Contact Balu R
Both r used for controlling purpose,but Normal servlet is servlet the user is resposible.But the action servlet is by deafaulty configure with struts Framework.
ActionServlets implements FrontController Design pattern. ActionServlet is a singleton,but NormalServlet is not a Singleton. Source: CoolInterview.com
Answered by: sreenivasulu | Date: 11/24/2009
| Contact sreenivasulu
There is some difference between normal servlet and ActionServlet. Action servlet is configure with struts framework and it creates action class and actionform Source: CoolInterview.com
Answered by: Sravan | Date: 12/15/2009
| Contact Sravan
Normal Servlet extends from Servlet or HttpServlet, but Action Servlet class extends from ActionServlet. ActionServlet must have the execute method to forward the request to some action class. Source: CoolInterview.com
Answered by: Zahid Nasim | Date: 1/8/2010
| Contact Zahid Nasim
normal and actionServlet both extends HttpServlet,in normal servlet there is no execute method,normal servlet is user defined class but action servlet is predefined Source: CoolInterview.com
Answered by: Rajeev | Date: 3/5/2010
| Contact Rajeev
What is the difference between a normal servlet and action servlet?
Ans:- The ActionServlet is a predefined servlet type class which comes along with struts framework, It follows the “Front Controller” design pattern. Then main purpose of the ActionServlet is to receive the every request from the client and control the flow of process by using some helper classes like RequestProcessor. The programmer can directly use this class with out any implementation of it because it's already defined.
Normal Servlet: In case of normal servlet we should extends our class either from GenericServlet or HttpServlet or else implements Servlet. The Normal servlet doesn't follow the “Front Controller” design pattern that means every servlet might not be comes to the same servlet. Every request might point to different servlet. Source: CoolInterview.com
Answered by: Shaik Baji | Date: 4/20/2010
| Contact Shaik Baji
Normal servlet and Action both basically same only difference is that action servlet consists of logic for forwarding the request to corresponding action class. and one is also action servlet execute mathod. Source: CoolInterview.com
Answered by: yogesh | Date: 5/17/2010
| Contact yogesh
actionservlet is a singleton java class.some servers like web logic not follow the servlets specification bcz 300 req gives simultaneously it creates a new servlet obj at thar time servelt specifiation is failure .i.e single instance multiple thread concept Source: CoolInterview.com
Answered by: kiran | Date: 6/9/2010
| Contact kiran
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|