Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is the use of <bean:header/> tag defined by Bean tag library in Struts framework?
The <bean:header/> tag functions exactly like <bean:cookie/>, except that it retrieves its values from the named request header. Once the tag has the header values, it creates a java.lang.String or java.lang.String[] attribute and stores it in the pageContext.
If the named header cannot be located and no default value is given, then a request-time exception will be thrown. The <bean:header/> tag has a body type of JSP and supports four attributes:
id, name, multiple, value.

Example : 
  <bean:header id="headerID"
     name="Cache-control"
     value="Cache-control not found" />