⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logicdemo03.jsp

📁 提供了struts中的logic标签全方面的实践,对初学者很有参考价值.
💻 JSP
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<html:html lang="true">
  <head>
    <title>LogicDemo01.jsp</title>
  </head>
  
  <body>
  <%
	// request.setAttribute("ref",new Integer(1)) ;
	request.setAttribute("ref",new Character('1')) ;
	// 通过标签判断在指定范围中是否有属性存在
  %>
  <logic:equal name="ref" scope="request" value="1">
	<h1>内容为1!!!</h1>
  </logic:equal>
  <logic:notEqual name="ref" scope="request" value="1">
	<h1>内容不为1!!!</h1>
  </logic:notEqual>
  <logic:greaterThan name="ref" scope="request" value="0">
	<h1>内容大于0!!!</h1>
  </logic:greaterThan>
  <logic:greaterEqual name="ref" scope="request" value="1">
	<h1>内容大于等于1!!!</h1>
  </logic:greaterEqual>
  <logic:lessThan name="ref" scope="request" value="2">
	<h1>内容小于2!!!</h1>
  </logic:lessThan>
  <logic:lessEqual name="ref" scope="request" value="1">
	<h1>内容小于等于1!!!</h1>
  </logic:lessEqual>
  </body>
</html:html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -