Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 disadvantage of struts frame work?

11 Answers  


Do you need an alignment after replacing struts?

0 Answers  


What are the core components of a struct2 based application?

0 Answers  


What are the classes used as part of struts framework ?

0 Answers  


what is is the use DynaActionForm?

3 Answers   TCS,


How do you customize ActionServlet?

3 Answers   Ness Technologies,


What is the DynaActionForm? How we implement the dynaactionform ? can u please tell me the way to implement? in understandable way?

8 Answers   JBA Infotech,


how to connect from struts to database through hibernet and where u can modify the class

0 Answers   Polaris,


How can we display validation errors on jsp page?

0 Answers  


Briefly tell the two kinds of form beans.

0 Answers  


What is the use of form bean in struts?

0 Answers  


What are the core classes of struts framework? Explain

0 Answers  


Categories