how will you view ur jsp page to the client by using
properties file?
Answers were Sorted based on User's Feedback
Answer / jane priscilla
Instead of having hard-coded messages or error messages in
the framework, Struts Validator allows you to specify a key
to a message in the ApplicationResources.properties (or
resourcebundle.properties)
File that should be returned if a validation fails.
For ex:
In ApplicationResources.properties we'll have such entries
study.empNo=EmployeeNo
study.empName=EmployeeName
error.name.required=field is mandatory
error.empNo.required=mandatory
The following code will explain u how to use this resource
Properties in the jsp
<tr>
<td><bean:message key="study.empName" />:</td>
<td><html:text property="employeeName"/></td>
</tr>
<html:messages id=”messages” property=”name”>
<font color=”red”>
<bean:write name=”error.name” />
</html:messages>
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / mohan
Another way is that you can do the validation in the
ActionForm, and display messages or the error messages by
using errors.add() method.
| Is This Answer Correct ? | 1 Yes | 0 No |
In struts how to use regurlar formbeans using validation framework explain?
Explain the difference between jakarta struts and apache struts?
session menagement in servlets explaion briefly?
How do you know what to give for the "path " under in struts-config.xml ?
What is the purpose of execute method of action class?
how to write uploadphoto in the insert update delete using struts? write code struts and jsp jdbc
Provide some important Struts2 constants that you have used?
What are action errors?
What configuration files are used in struts?
What's mvc pattern ?
What is Custom Type Converter in Struts2?
What should be the name of xml file used for validation in struts?