You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Derek Richardson <De...@appiancorp.com> on 2003/09/26 21:59:45 UTC

Struts-el: Page Tag: Why?

The bean:page tag is not one of the tags listed as not being ported into struts-el (http://jakarta.apache.org/struts/faqs/struts-el.html). This means that bean:page can do something struts-el cannot. Will someone point out to me what this is? I wrote a test JSP and cannot find any functionality of the page tag that cannot be reproduced with the JSTL set tag and the EL.

My test jsp is below. The output I get is true in all cases.

Thanks,
Derek Richardson

<%@ taglib prefix="c" uri="/tags/jstl-core" %>
<%@ taglib prefix="b" uri="/tags/struts-bean" %>

<b:page id="a1" property="application" />
<b:page id="b1" property="config" />
<b:page id="c1" property="request" />
<b:page id="d1" property="response" />
<b:page id="e1" property="session" />

<c:set var="a2" value="${pageContext.servletContext}" />
<c:set var="b2" value="${pageContext.servletConfig}" />
<c:set var="c2" value="${pageContext.request}" />
<c:set var="d2" value="${pageContext.response}" />
<c:set var="e2" value="${pageContext.session}" />

<html>
<head><title>Test Bean Library Versus JSTL</title></head>
<body>
Application: <c:out value="${a1==a2}" /><br>
Config: <c:out value="${b1==b2}" /><br>
Request: <c:out value="${c1==c2}" /><br>
Response: <c:out value="${d1==d2}" /><br>
Session: <c:out value="${e1==e2}" /><br>
</body>
</html>

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