You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Adam Sherman <ad...@tritus.ca> on 2003/03/25 17:14:20 UTC

JSTL c:out Output Problem

I have the following JSP:
<c:forEach items="${list.headers}" var="header">
	<th><c:out value="${header}" /></th>
</c:forEach>

${list.headers} is set to "String[]  HEADERS  = {"Name", "Email Address"}".

I get:

org.apache.taglibs.standard.lang.jstl.ImplicitObjects$7@cbbe37 
org.apache.taglibs.standard.lang.jstl.ImplicitObjects$7@cbbe37

WTF?

I tried looking at it from avery angle, using a List of Strings instead of 
an array to no avail.

Help!

Thanks,

A.

--
Adam Sherman
Tritus CG Inc.
http://www.tritus.ca/
+1 (613) 797-6819

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


How to use the JSTL in Tomcat 4.1.24 ?

Posted by Rex Hsu <Re...@foryou.com.tw>.
Dear sir and madam,

I have a stupid question about the Tomcat 4.1.x to use the JSTL. After the
Tomcat 4.1.24 installation, and download the Jakarta-Taglibs packages. If I
wonder to use the JSTL about the <c:out ..., how can I setup that and use
that ?

After I follow the instruction of README file comes with the standard
package, I copy all of the *.jar files into my application's WEB-INF/lib
directory. And no any modification for the web.xml file. ( README didn't
mention that is necessary.) And I try to test the Out.jsp file in my
context. Then browser shown error message like below :
---------8<------------
org.apache.jasper.JasperException: This absolute uri
(http://java.sun.com/jstl-el/core) cannot be resolved in either web.xml or
the jar files deployed with this application
--------->8-----------
So, should I add anything in the web.xml file ? or I lack something settings
to use that ?

Thanks in advance ~
Best Regards,
Rex Hsu


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: JSTL c:out Output Problem

Posted by Adam Sherman <ad...@tritus.ca>.
On 03/25/03 14:04:14 -0500 Brian Buckley wrote:

> It appears you do not have ${list.headers}set up properly.  As written,
> you must have an object named "list" and that object must have a public
> getHeaders() method that returns an array, a list or other collection.
>
>> I have the following JSP:
>> <c:forEach items="${list.headers}" var="header">
>> <th><c:out value="${header}" /></th>
>> </c:forEach>

Thanksa for your input, it actually turns out that "header" is reserved and 
contains the page headers in an array. Changing var="header" to something 
different fixed my problem.

Thanks,

A.


--
Adam Sherman
Tritus CG Inc.
http://www.tritus.ca/
+1 (613) 797-6819

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: JSTL c:out Output Problem

Posted by Brian Buckley <br...@attbi.com>.
It appears you do not have ${list.headers}set up properly.  As written, you
must have an object named "list" and that object must have a public
getHeaders() method that returns an array, a list or other collection.

> I have the following JSP:
> <c:forEach items="${list.headers}" var="header">
> <th><c:out value="${header}" /></th>
> </c:forEach>



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org