Greetings.
I would appreciate guidance regarding review question # 6 from Chapter 13 - Reusable Web Components in the book SCWCD Exam Study Kit by Hanumant Deshmukh and Jignesh Malavia.
What I do not understand is how the red and green param values appear in the colors array.
The question is as follows:
File 1: this.jsp
html body pre
jsp:include page="that.jsp"
jsp

aram name="color" value="red" /
jsp

aram name="color" value="green" /
/jsp:include
/pre /body /html
File 2: that.jsp
%
String colors[] = request.getParameterValues("color");
for (int i=0; i<colors.length; i++)
{
out.print(colors[i] + " ");
}
%
What will be the output of accessing the this.jsp file via the following URL?
http:/localhost:8080/chapter13/this.jsp?color=blue
The answer is: red green blue
Explanation
The parameters passed via the <jsp

aram> tag to an included component tag take precedence over the parameters already present in the request object of the including component. Also, the order of values passed via the <jsp

aram> tag is the same as the order in which the tags appear. Thus, the correct answer is c. The output will be red green blue.
Thank you in advance for your assistance.
Jerry Bustamente
ps. pardon the absence of left and right carrots in the syntax. When I tried to submit this question I received,
"FYI We cannot post your topic because the subject contains < or >. Subjects may not contain this combination of those characters. Use your back button to try again."