name="org.apache.struts.action.MESSAGE"name - the variable to be compared to value is the JSP bean specified by this attribute, if property is not specified, or the value of the specified property of this bean, if property is specified.
example:
<%
String testString = "pantalones";
pageContext.setAttribute("testString", testString, PageContext.PAGE_SCOPE);
%>
<jsp:useBean id="testString" scope="page" type="java.lang.String" />
<logic:someComparisonTag name="testString" value="pantalones">
Usted tiene pantalones!
</logic:someComparison>name 应该是保存在attribute中的对象的名字,是全局的,估计在actionSevelt中初始化的时候就放进去了
example:
<%
String testString = "pantalones";
pageContext.setAttribute("testString", testString, PageContext.PAGE_SCOPE);
%>
<jsp:useBean id="testString" scope="page" type="java.lang.String" />
<logic:someComparisonTag name="testString" value="pantalones">
Usted tiene pantalones!
</logic:someComparison>name 应该是保存在attribute中的对象的名字,是全局的,估计在actionSevelt中初始化的时候就放进去了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货