Please correct foreach loop as below
<c:forEach var="data" items="${requestScope.name}" >
Your code should be like this
<c:forEach var="data" items="${requestScope.name}" >
<c:out value="${data}"> </c:out>
<h1>${name}</h1>
</c:forEach>
1) <c:out value="${name}" />
2) <c:out value="${requestScope.name}" />
requestScope when you absoluetely want your object to come from the request, and not from the page, session or application scope , while using ${name} will search for a name attribute in the page, then in the request, then in the session, then in the application.
Let's say that some other code in the JSP set a name attribute in the page scope. But you want to access the name in the request: you're forced to use requestScope.
Let's say the session might have a name attribute. Not using requestScope.name would return the session-scoped name if the JSP forgot to set the name attribute in the request scope.
If the goal of the JSP fragment is to access something set in the enclosing JSP, maybe this JSP fragment should be a JSP tag, and you should pass the name as an argument to this tag.