how will you view ur jsp page to the client by using
properties file?

Answers were Sorted based on User's Feedback



how will you view ur jsp page to the client by using properties file?..

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

how will you view ur jsp page to the client by using properties file?..

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

Post New Answer

More Struts Interview Questions

Can we have multiple struts config files in a single web app?

0 Answers  


What applications use apache struts?

0 Answers  


Explain about the process of functioning of the struts program?

0 Answers  


How can we get Servlet API Request, Response, HttpSession etc Objects in action classes?

0 Answers  


Are struts still used?

0 Answers  






What is Custom Type Converter in Struts2?

0 Answers  


What is struts and springs in java?

0 Answers  


How many struts config file can be created in struts?

0 Answers  


What is the purpose of @customvalidator annotation?

0 Answers  


struts comes under which layer of three tire architecture in real time projects plz i need explaination?

10 Answers   Infinite Computer Solutions, TCS,


What is Struts Flow?

17 Answers   CTS, rsystems,


What is the purpose of form-be tag in struct-config.xml?

0 Answers  


Categories