bean:header Tag - is used to define a scripting variable based on the value(s) of the specified request header.
This tag retrieve the value of the specified request header (may be a single or multiple values), and define the result as a page scope attribute of type String or String.
If no header with the specified name can be located, and no default value is specified, a request time exception will be thrown.
This attribute specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified request header.
If any arbitrary value for this attribute is specified, causes a call
This attribute specifies the name of the request header whose value, or values, is to be retrieved.
The default header value to return if no header with the specified name was included in this request.
Example Illustrating the use of the Header<bean:header>
Here you will learn to use the Struts Html bean:header tags.
We will cover an example that will show a working of<bean:header> tags
Example code :
Creating an Action Class : Not Required here.
Creating Form Bean : Not Required here.
Defining the global-forwards : Not Required here.
Developing the Action Mapping in the struts-config.xml :Not Required here.
Developing the beanHeaderTag.jsp page
Add the following line in the index.jsp to call the form.
Above actions displays the working of beanHeaderTag..
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.