Arthur Portas
Arthur Portas

Reputation: 129

JSTL implicit objects not working as expected

Printing implicit object with JSTL 1.1.2 gives me pointers instead of expected values!

Output:

cookie=[Ljava.lang.String;@52a96147
cache-control=[Ljava.lang.String;@6e31a6b6
connection=[Ljava.lang.String;@7db82f3e
accept-language=[Ljava.lang.String;@4725cfed
host=[Ljava.lang.String;@375f519
accept=[Ljava.lang.String;@352e3e15
user-agent=[Ljava.lang.String;@6eedeff9
accept-encoding=[Ljava.lang.String;@4725fd54
accept-charset=[Ljava.lang.String;@f1aba4a
This is JSTL 

Source:

<ul>
        <c:forEach var="aHeader" items="${headerValues}">
            <li>${aHeader}</li>
        </c:forEach>
    </ul>
    <c:out value="This is JSTL"/>

I have include <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> in JSP and also have jstl.jar and standard.jar inside WEB-INF/lib added to build path. Using Glassfish 3.1.2.and Servlet 3.0.

Upvotes: 0

Views: 792

Answers (1)

user207421
user207421

Reputation: 311054

Printing implicit object with JSTL 1.1.2 gives me pointers instead of expected values!

On what basis are you expecting anything else? All those methods return header values which are supplied as String[] objects.

Upvotes: 3

Related Questions