Q: What is the difference between perform() and execute() methods?
Answer: Perform method is the method which was deprecated in the Struts Version 1.1. In Struts 1.x, Action.perform() is the method called by the ActionServlet. This is typically where your business logic resides, or at least the flow control to your JavaBeans and EJBs that handle your business logic. As we already mentioned, to support declarative exception handling, the method signature changed in perform. Now execute just throws Exception. Action.perform() is now deprecated; however, the Struts v1.1 ActionServlet is smart enough to know whether or not it should call perform or execute in the Action, depending on which one is available.

Q: What are the various Struts tag libraries?
Answer: Struts is very rich framework and it provides very good and user friendly way to develop web application forms. Struts provide many tag libraries to ease the development of web applications. These tag libraries are:
* Bean tag library – Tags for accessing JavaBeans and their properties.
* HTML tag library – Tags to output standard HTML, including forms, text boxes, checkboxes, radio buttons etc..
* Logic tag library – Tags for generating conditional output, iteration capabilities and flow management
* Tiles or Template tag library – For the application using tiles
* Nested tag library – For using the nested beans in the application

Advertisements