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

What is the life cycle of actionform?

0 Answers  


What is action support class in struts2?

0 Answers  


What is struts? Explain

0 Answers  


what is diffrence between Dynaactionform,actionform and Dynavalidateform

8 Answers   TCS,


How do you know what to give for the "path " under in struts-config.xml ?

1 Answers  






What are the two scope types for formbeans?

0 Answers  


I will explain the scenario now i have a form1 having some fields and i made it extends DynaActionForm. in struts config how can i specify another form form2 which has to extend the form1 please specify is it better to use actionform or dyna action form in applations. is dyna action form is comfortable in declaring form variables of type 'ArrayList<somegenerics>' extend the

0 Answers   Techno Solutions,


which MVC architecture struts follows and why?

6 Answers   IBM,


How to explain struts work flow

12 Answers   CSS, iFlex, iGate, mpower, TCS,


what is use of assert keyword in java..?

1 Answers  


Difference between html tags and struts specific html tags

0 Answers  


What is role of action class?

0 Answers  


Categories