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...


1.when actionservelet execute.
2.when web.xml executes

Answers were Sorted based on User's Feedback



1.when actionservelet execute. 2.when web.xml executes..

Answer / shaik baji

--------
1)The "web.xml" comes into the the picture when the
respective server is started. When the time of server is
starting the container will check the syntax and parse
the "web.xml" file.
2)The "web.xml" file is called as a deployment descripta
because it tells the server just what the application
contains that's it beyond of that it's doesn't do any thing.

ActionServlet:
--------------
1)ActionServlet is a predefined Servlet class which comes
along with struts framework.
2)When we implemented a struts based web application then
every request and response must go through the controller
(ActionServlet).
3)We can define our own ActionServlet class insted of using
the predefined ActionServlt class but in most of all cases
we will use only the predefined ActionServlet class.
4)We should configure the ActionServlet class in
the "web.xml" file like as followed

Example:
--------
<web-app>
<servlet>
<servlet-name>as</servlet-name>
<servlet-
class>org.apache.struts.action.ActionServlet</servlet-class>

<load-on-startup>1</load-on-startup>

<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-
config.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>as</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>

5)If we specified "<load-on-startup>" then
the "ActionServlet" class will load,instantiated and
initilized when the server or application started.
6)If we didn't specify "<load-on-startup>" then
the "ActionServlet" class will load,instantiated and
initialized when the first request comes.

Is This Answer Correct ?    21 Yes 0 No

1.when actionservelet execute. 2.when web.xml executes..

Answer / srikanth

at container startup, container reads the web.xml using sax
perser

in web.xml,we are configuring ActionServlet with load on
start up tag ,then ActionServlet will loaded,
<servlet-name>as</servlet-name>
<servlet-
class>org.apache.struts.action.ActionServlet</servlet-class>
<load-on-startup>1</load-on-startup>

Is This Answer Correct ?    0 Yes 0 No

1.when actionservelet execute. 2.when web.xml executes..

Answer / ravikiran

web.xml will execute during the deployemnt / server start
up as the Action servlet instance been called from web.xml
the call will be secondary where the webxml precedes it

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More Struts Interview Questions

What is the purpose of @emailvalidator annotation?

0 Answers  


why we are using vo,dao and dto design patterns in struts framework

3 Answers   Wipro,


How to override the default error message that can come during file uploading process?

0 Answers  


how can u handle run time exceptions in struts and jsp plz explain briefly not single word answer?

2 Answers   TCS,


What is the purpose of @after annotation?

0 Answers  


what are tiles in struts?

3 Answers   Wipro,


What are Struts2 core components?

0 Answers  


What is action support class in struts2?

0 Answers  


State an example of struts configuration file as an action parameter for action servlet.

0 Answers  


How do you create message resource?

0 Answers  


Difference between struts and spring? Or why use spring, if you are already using struts?

0 Answers  


What are the conditions for actionform to work correctly?

0 Answers  


Categories