What is Struts Validator Framework?
Struts Framework provides the functionality to validate the form data. It can be use to validate the data on the users browser as well as on the server side. Struts Framework emits the java scripts and it can be used validate the form data on the client browser. Server side validation of form can be accomplished by sub classing your From Bean with DynaValidatorForm class. Struts Framework provides the functionality to validate the form data. It can be use to validate the data on the users browser as well as on the server side. Struts Framework emits the java scripts and it can be used validate the form data on the client browser. Server side validation of form can be accomplished by sub classing your From Bean with DynaValidatorForm class.
Give the Details of XML files used in Validator Framework?
The Validator Framework uses two XML configuration files validator-rules.xml and validation.xml. The validator-rules.xml defines the standard validation routines, these are reusable and used in validation.xml. to define the form specific validations. The validation.xml defines the validations applied to a form bean.
How you will display validation fail errors on jsp page?
Following tag displays all the errors:
Google Enter your search terms Submit search form
How you will enable front-end validation based on the xml in validation.xml?
The
What is Jakarta Struts Framework?
Jakarta Struts is open source implementation of MVC (Model-View-Controller) pattern for the development of web based applications. Jakarta Struts is robust architecture and can be used for the development of application of any size. Struts framework makes it much easier to design scalable, reliable Web applications with Java.
What is ActionServlet?
The class org.apache.struts.action.ActionServlet is the called the ActionServlet. In the the Jakarta Struts Framework this class plays the role of controller. All the requests to the server goes through the controller. Controller is responsible for handling all the requests.
How you will make available any Message Resources Definitions file to the Struts Framework Environment?
Message Resources Definitions file are simple .properties files and these files contains the messages that can be used in the struts project. Message Resources Definitions files can be added to the struts-config.xml file through
Example:
What is Jakarta Struts Framework? - Jakarta Struts is open source implementation of MVC (Model-View-Controller) pattern for the development of web based applications. Jakarta Struts is robust architecture and can be used for the development of application of any size. Struts framework makes it much easier to design scalable, reliable Web applications with Java
.What is ActionServlet? - The class org.apache.struts.action.ActionServlet is the called the ActionServlet. In the the Jakarta Struts Framework this class plays the role of controller. All the requests to the server goes through the controller. Controller is responsible for handling all the requests.
How you will make available any Message Resources Definitions file to the Struts Framework Environment?
Message Resources Definitions file are simple .properties files and these files contains the messages that can be used in the struts project. Message Resources Definitions files can be added to the struts-config.xml file through
Example:
What is Action Class? -
The Action Class is part of the Model and is a wrapper around the business logic. The purpose of Action Class is to translate the HttpServletRequest to the business logic. To use the Action, we need to Subclass and overwrite the execute() method. In the Action Class all the database/business processing are done. It is advisable to perform all the database related stuffs in the Action Class. The ActionServlet (commad) passes the parameterized class to Action Form using the execute() method. The return type of the execute method is ActionForward which is used by the Struts Framework to forward the request to the file as per the value of the returned ActionForward object.
Write code of any Action Class?
Here is the code of Action Class that returns the ActionForward object.
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class TestAction extends Action
{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
{
return mapping.findForward("testAction");
}
}
What is ActionForm? - An ActionForm is a JavaBean that extends org.apache.struts.action.ActionForm. ActionForm maintains the session state for web application and the ActionForm object is automatically populated on the server side with data entered from a form on the client side.
Give the Details of XML files used in Validator Framework?
The Validator Framework uses two XML configuration files validator-rules.xml and validation.xml. The validator-rules.xml defines the standard validation routines, these are reusable and used in validation.xml. to define the form specific validations. The validation.xml defines the validations applied to a form bean.
How you will display validation fail errors on jsp page? - The following tag displays all the errors:
How you will enable front-end validation based on the xml in validation.xml?
The
Search Your Question
Thursday, April 17, 2008
Java Struts Interview Questions
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2008
(992)
-
▼
April
(208)
- Can you name different software development life c...
- What is Microsoft Analysis Service?
- Explain what is “AutoPostBack” feature in ASP.NET ?
- Can you explain what is DCOM ?
- What do you understand by Data mining and Data War...
- How can we find out what the garbage collector is ...
- How can we stop our code being reverse-engineered ...
- How do you stop a running thread?
- How does an AppDomain get created?
- How is method overriding different from method ove...
- Is COM+ dead? Is COM+ is not needed anymore?
- Is DCOM dead? not needed anymore?
- Should you use ReaderWriterLock instead of Monitor...
- What are different types of caching in ASP.Net?
- What are the validation controls?
- What are user controls and custom controls?
- What does aspnet_regiis -i do ?
- What is Regression Testing?
- What is the difference between an event and a dele...
- What is view state and use of it?
- What's a bubbled event?
- Why do we get errors when we try to serialize a Ha...
- Why is XmlSerializer so slow?
- How can I load the icons provided by .NET dynamica...
- In windows forms what class does Icon derive from?
- How's anchoring different from docking in windows ...
- Why is it not a good idea to insert code into Init...
- Why is it not a good idea to insert code into Init...
- What is ErrorProvider control? When would you use it?
- Can you debug a Windows Service? How ?
- How can a win service developed in .NET be install...
- What is a Windows Service and how does its lifecyc...
- What does AspCompat="true" mean and when should it...
- Is it possible to prevent a browser from caching a...
- Is it possible to prevent a browser from caching a...
- What technology enables out-of-proc communication ...
- What are some of the responsibilities of the CLR?
- What are some features of the CLR?
- What are some features of the CLR?
- What are namespaces used for in .NET?
- How do class property members work in C#?
- What does a binding define in a WSDL document? Wha...
- What are the main similarities and differences bet...
- What information do you need to know in order to a...
- True false questions - Set 1
- True false questions - Set 2
- True false questions - Set 3
- What are CAO's i.e. Client Activated Objects ?
- Can you configure a .NET Remoting object via XML f...
- What does a Port define? What does the PortType de...
- What makes web services usable in almost any devel...
- When should a struct be used instead of a class?
- How does the switch statement in C# differ from th...
- What are some similarities and differences between...
- What is the main Difference between Managed code a...
- In Dot Net What are different type of JIT ?
- Is versioning applicable to private assemblies?
- What is .Net Remoting
- What was .net Framework 3.0 earlier known as?
- What are the changes to the version of the .NET Fr...
- Can DotNet Framework 3 be installed over Framework 2?
- What is the version of C# In .net Framework 3.0?
- What Operating system are supported by Framework 3.0?
- What are the 4 basic new technologies included in ...
- What is a workflow? How does Windows workflow foun...
- What are the components found in Windows workflow ...
- What tool is available for creating workflows in d...
- What Improvements does WCF offers over its earlier...
- What contemporary computing problems WCS solves?
- What are WCF features and what communication probl...
- What is High assurance certificate?
- What contemporary computing problems WPF solves?
- What is XAML ?
- What is XBAP?
- What is a service contract ( In WCF) ?
- In terms of WCF, What is a message?
- In terms of WCF, What is a service?
- In terms of WCF, What is an endpoint?
- In terms of WCF, What is an application endpoint?
- In terms of WCF, What is an infrastructure endpoint?
- In terms of WCF, What is an address?
- In terms of WCF, What is binding?
- What is a message contract?
- IN WCF, what do you understand by metadata of a se...
- What are activities in Windows Workflow Foundation?
- What do you mean by Code Refactoring?
- What is ASP.Net Web Matrix?
- What do you mean by shipping in terms of sql server ?
- What is 'Write-ahead log' in Sql Server 2000 ?
- What is DOM?
- What is XPATH?
- What is the difference between abstract class and ...
- What is a Satellite Assembly ?
- What is late binding ?
- What do you understand by the term "immutable"?
- enforce a call from an inherited constructor to an...
- How do you make sure that your code runs when the ...
- Why does code get a security exception when its ru...
- Can you use the Win32 API from a .NET Framework pr...
- How do in-process and cross-process communication ...
-
▼
April
(208)
No comments:
Post a Comment