Struts
What is IncludeAction?
Dec 2nd
The IncludeAction class is useful when you want to integrate Struts into an application that uses Servlets. Use the IncludeAction class to include another resource in the response to the request being processed.
What is the directory structure of Struts application?
Dec 2nd
The directory structure of Struts application :
How can we make message resources definitions file available to the Struts framework environment?
Dec 1st
We can make message resources definitions file (properties file) available to Struts framework environment by adding this file to struts-config.xml.
<message-resources parameter=”com.login.struts.ApplicationResources”/>
How can we make message resources definitions file available to the Struts framework environment?
Nov 27th
We can make message resources definitions file (properties file) available to Struts framework environment by adding this file to struts-config.xml.
<message-resources parameter=”com.login.struts.ApplicationResources”/>
How can we make message resources definitions file available to the Struts framework environment?
Nov 26th
We can make message resources definitions file (properties file) available to Struts framework environment by adding this file to struts-config.xml.
<message-resources parameter=”com.login.struts.ApplicationResources”/>
What is the Servlet?
Nov 26th
A servlet is a Java programming language class that is used to extend the capabilities of servers that host applications accessed by means of a request- response programming model.
How the exceptions are handled in struts?
Nov 26th
Exceptions in Struts are handled in two ways:
- Programmatic exception handling :
Explicit try/catch blocks in any code that can throw exception. It works well when custom value (i.e., of variable) needed when error occurs.
- Declarative exception handling :You can either define <global-exceptions> handling tags in your struts-config.xml or define the exception handling tags within <action></action> tag. It works well when custom page needed when error occurs. This approach applies only to exceptions thrown by Actions.
<global-exceptions> <exception key=”some.key” type=”java.lang.NullPointerException” path=”/WEB-INF/errors/null.jsp”/> </global-exceptions>
or
<exception key=”some.key” type=”package.SomeException” path=”/WEB-INF/somepage.jsp”/>
What is the life cycle of ActionForm?
Nov 26th
The lifecycle of ActionForm invoked by the RequestProcessor is as follows: • Retrieve or Create Form Bean associated with Action • “Store” FormBean in appropriate scope (request or session) • Reset the properties of the FormBean • Populate the properties of the FormBean • Validate the properties of the FormBean • Pass FormBean to Action
What are the various Struts tag libraries?
Nov 26th
The various Struts tag libraries are: • HTML Tags • Bean Tags • Logic Tags • Template Tags • Nested Tags • Tiles Tags
