R4R
Right Place For Right Person TM
R4R Java JSF Struts FAQs Struts Subjective Questions And Answers

 


Totel:135 Click: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

Struts Interview Questions And Answers

Page 4

Questions 16 
Describe the purpose of the Action class?

Answer
The org.apache.struts.action.Action class is a most common component of the Struts Controller. This class must be extended for each specialized Struts function in your application. The collection of these Action classes is what defines your web application. To develop your own Action class, you must complete the following steps: * Create a class that extends the org.apache.struts.action.Action class. * Implement the appropriate execute() method and add your specific business logic. * Compile the new Action and move it to the Web application's classpath, i.e. /WEB-INF/classes directory. * Add an <action> element to the application's struts-config.xml file describing the new Action.

Questions 17 What are Struts Plugins?

Answer
Struts Plugins are modular extensions to the Struts COntroller. They are defined by the org.apache.struts.action.Plugin interface. Struts Plugins are useful are useful when you are allocating resources or preparing connections to the databases or even JNDI resources. This interface defines two lifecycle mathods: init() and desstroy().

Questions 18 
What are the steps involved in Struts Plugins?

Answer
All Plugins must implement the two Plugin methods init() and destroy(). To develop your own Plugin You must complete the following steps: * Create a class that implements the org.apache.struts.action.Plugin interface. * Add a default empty contructor to the Plugin implementation. You must have a default constructor to ensure that the ActionServlet property creates your Plugin. * Implement both the init() and destroy() methods and your implementation. * Compare the new Plugin and move it into the web applocation's classpath. * Add a <plug-in> element to the application's struts-config.xml file describing the new Plugin.

Questions 19 What is RequestProcessor? How will you create your own RequestProcessor? 

Answer
The RequestProcessor is the class that you need to override when you want to customize the processing of the ActionServlet. It contains a predefined entry point that is invoked by the Struts controller with each request. The entry point is the processPreprocess() method. Steps involved in creation your own RequestProcessor: * Create a class that extends the org.apache.struts.action.RequestProcessor class. * Add a default empty constructor to the RequestProcessor implementation. * Implement your processPreprocess() method.

Questions 20 
How will you configure the Plugin in your web application.

Answer
To deploy and configure your Plugin class, you must: * Compile and move the Plugin class file into your application's WEB-INF/classes/ directory. * Add a <plug-in> element to your struts-config.xml file. For example: <plug-in className="MyPlugin"/> The <plug-in> element should be the last element in the struts-config.xml file. * Restart the Web application.


Goto Page:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Share |

Struts Objective Questions And Answers

Struts Objective Questions And Answers

Struts Interview Questions And Answers

Struts Interview Questions And Answers


R4R,Struts Objective, Struts Subjective, Struts Interview Questions And Answers,Struts,Struts Interview,Struts Questions ,Struts Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R