tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pembroke, Brian" <Brian.Pembr...@ANICO.com>
Subject RE: Page scope problems
Date Mon, 11 Aug 2003 15:23:49 GMT
Thanks..

-----Original Message-----
From: Siggelkow, Bill [mailto:bill.siggelkow@mirant.com]
Sent: Monday, August 11, 2003 10:12 AM
To: 'Tag Libraries Users List'
Subject: RE: Page scope problems


JSTL, by design, uses scoped variables, not scripting variables.  So the
documentTypeList scripting variable you are referencing is not in Page
Scope. A quick solution would be to put the vector into pageScope in your
scriptlet as in:
<%
Vector documentTypeList  = (Vector) dataBean.getListValue
(SlaicoUtilConstants.CONST_DOCUMENT_TYPE_LIST);
pageContext.setAttribute("documentTypeList", documentTypeList);
%>

-----Original Message-----
From: Pembroke, Brian [mailto:Brian.Pembroke@ANICO.com]
Sent: Monday, August 11, 2003 10:52 AM
To: 'taglibs-user@jakarta.apache.org'
Subject: Page scope problems


I'm not able to get a value from page scope through the jstl tags.
The scriplet is not null but the test for empty using the jstl tags, is
null.  The documentTypeList should
not be null.  Below is a copy of the jsp that is giving me a problem. If
anybody could give me any idea's on how to correct the problem, I would
greatly appreciate it.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<HTML>
<HEAD>
<META http-equiv="Content-Style-Type" content="text/css">
<TITLE>State Availability</TITLE>
<jsp:useBean id="dataBean" class="com.anico.dasd.DataBean"
	scope="request" />

<%
Vector documentTypeList  = (Vector) dataBean.getListValue
(SlaicoUtilConstants.CONST_DOCUMENT_TYPE_LIST);
%>
</HEAD>

<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
if (documentTypeList == null) {
  out.println("document type list is empty");
} else {
  out.println("document type list is not empty");
}
%>
<c:if test="${empty documentTypeList}">
   <c:out value="document type list is empty"/> 
</c:if>
</BODY>
</HTML>  


Thanks,
Brian Pembroke
Senior Web Developer II
American National Insurance Company
1 Moody Plaza, 9th Floor
Galveston, Texas 77550-7999 
Phone: (409) 763-4661 x4599 
E-mail: brian.pembroke@anico.com



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

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

Mime
View raw message