GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Struts
Go To First  |  Previous Question  |  Next Question 
 Struts  |  Question 60 of 102    Print  
what is the difference between bean:write and bean:message

  
Total Answers and Comments: 4 Last Update: October 12, 2007     Asked by: pavani 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Syam Raj
 
bean:write is used to display the value of a property in a java bean or ur action form.

bean:message is used to display the label...which are picked from the message resources...

Above answer was rated as good by the following members:
pradeepkmr18, pradeep_rmk
July 20, 2006 01:28:00   #1  
S Prithviraj        

RE: what is the difference between bean:write and bean...

In Jakarta Struts - you may be knowing that - both are custom tags defined in HTML Tag library.

Both are used for accessing Java beans.

Bean:Message - is to access a java bean that will display a message such as " For more details on the product displayed in this web site please contact a phone number 12345.."

Bean: write - is to display a data from the model; example "Number of People visited this site is: 1234

Bean does not directly write. the Tag is used to take help of these Beans for the above mentioned purposes


 
Is this answer useful? Yes | No
August 03, 2006 13:41:02   #2  
siva kumar reddy        

RE: what is the difference between bean:write and bean...

hi

in the jsp

<% @taglib uri="/tags/struts-bean" pefix="bean" %>

<ul>

<bean:messages var="msg" property="propone">it will returns errors in the formbean tag

<li>

<bean:wrtite id="var"/>it will returns data abt the formbean

</li>

</bean:messages>

</ul>


 
Is this answer useful? Yes | No
March 16, 2007 15:17:40   #3  
Syam Raj        

RE: what is the difference between bean:write and bean...
bean:write is used to display the value of a property in a java bean or ur action form.

bean:message is used to display the label...which are picked from the message resources...

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
October 11, 2007 10:30:42   #4  
Suresh        

RE: what is the difference between bean:write and bean...

bean:message retrieves an internationalized message for the specified locale, using the specified message key, and write it to the output stream. Up to five parametric replacements (such as "{0}") may be specified.

The message key may be specified directly, using the key attribute, or indirectly, using the name and property attributes to obtain it from a bean.

Retrieve the value of the specified bean property, and render it to the current JspWriter as a String.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape