GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Struts
Go To First  |  Previous Question  |  Next Question 
 Struts  |  Question 11 of 103    Print  
What we will define in Struts-config.xml file. And explain their purpose

  
Total Answers and Comments: 8 Last Update: June 07, 2008   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: pradeepkmr18
 

These are the tags we can define

<data-sources/>
<form- beans/>,
<global- forwards/>,
<actionmappings/>,
<exception/>,
<message-resources>,
<switch-action>
<plug-in/> 



Above answer was rated as good by the following members:
raghu.emails
March 08, 2005 07:29:08   #1  
John        

RE: What we will define in Struts-config.xml file. And explain their purpose
The main control file in the Struts framework is the struts-config.xml XML file where action mappings are specified. This file's structure is described by the struts-config DTD file which is defined at http://jakarta.apache.org/struts/. A copy of the DTD can be found on the /docs/dtds subdirectory of the framework's installation root directory. The top-level element is struts-config. Basically it consists of the following elements:

data-sources—A set of data-source elements describing parameters needed to instantiate JDBC 2.0 Standard Extension DataSource objects

form-beans—A set of form-bean elements that describe the form beans that this application uses

global-forwards—A set of forward elements describing general available forward URIs

action-mappings—A set of action elements describing a request-to-action mapping

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 07, 2005 23:21:32   #2  
Suresh Pendyala        

RE: What we will define in Struts-config.xml file. And explain their purpose
It is heart of the Struts application.
 
Is this answer useful? Yes | No
September 20, 2005 04:47:01   #3  
Hema        

RE: What we will define in Struts-config.xml file. And...
We will define formbean name exception types in struts-config.xml.Apart from this we will give action mapping which has actionpath type name scope and forward name.
 
Is this answer useful? Yes | No
October 14, 2005 02:15:24   #4  
chirag desai        

RE: What we will define in Struts-config.xml file. And...
We will define Data-source[for database connectivity] Action Mappings[for action input and next output] Action Forward[global forward] Action Errors etc....
 
Is this answer useful? Yes | No
February 24, 2007 14:04:44   #5  
sivanesh.a Member Since: December 2006   Contribution: 189    

RE: What we will define in Struts-config.xml file. And...
The main control file in the Struts framework is the struts-config.xml XML file where action mappings are specified. This file's structure is described by the struts-config DTD file
 
Is this answer useful? Yes | No
April 03, 2007 05:25:03   #6  
Thiyagarajan Nagan        

RE: What we will define in Struts-config.xml file. And...
Struts-config.xml will have form-bean definitions and action-mappings definitions. After getting the request the controller will look for mapping information in this xml file and lead to action class or whatever. Then the model(Action class) will process the request and return the Actionforward object back to the controller. Again the controller will look for mapping information in struts-config.xml and transfer the Actionforward object to the correct jsp page.
 
Is this answer useful? Yes | No
April 04, 2007 03:20:37   #7  
Sony V George        

RE: What we will define in Struts-config.xml file. And...
We can say like soul of struts is Struts-config.xml.

The server will read struts-config.xml once only on the time of server starting. so server will know how and where to re-route to each and every request according to the flow. The Struts-config.xml have all the datsils like

Form-bean Data-source Action-Mapping Applicationproperties Global-exception Global-error.

Server will have the context of all these details.

 
Is this answer useful? Yes | No
June 07, 2008 02:54:03   #8  
pradeepkmr18 Member Since: June 2008   Contribution: 25    

RE: What we will define in Struts-config.xml file. And explain their purpose

These are the tags we can define

<data-sources/>
<form- beans/>
<global- forwards/>
<actionmappings/>
<exception/>
<message-resources>
<switch-action>
<plug-in/>


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

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

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

Page copy protected against web site content infringement by Copyscape