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

📄 testlogic.jsp

📁 ktv点歌系统前台收银有开包房
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'testLogic.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <%
String[] colors={"red","green","blue"};
String[] countries1={"中国","美国","法国"};
String[] persons={"乔丹","布什","克林顿"};
String[] persons2={"乔丹2","布什","克林顿"};
String[] persons3={"乔丹3","布什","克林顿"};
String[] persons4={"乔丹4","布什","克林顿"};
String[] colors2={"red","green","blue"};
String[] countries11={"中国1","美国","法国"};
String[] colors3={"red3","green","blue"};
String[] countries13={"中国3","美国","法国"};
String[] colors4={"red4","green","blue"};
String[] countries14={"中国4","美国","法国"};
String[] colors5={"red5","green","blue"};
String[] countries15={"中国5","美国","法国"};
String[] colors6={"red6","green","blue"};
String[] countries17={"中国7","美国","法国"};
ArrayList list2=new ArrayList();
list2.add(colors);
list2.add(countries1);
list2.add(persons);
list2.add(colors5);
list2.add(colors3);
list2.add(countries17);
list2.add(colors4);
list2.add(colors6);
list2.add(countries13);
list2.add(colors2);
list2.add(persons2);
list2.add(persons3);
list2.add(persons4);
list2.add(countries11);

list2.add(countries14);
list2.add(countries15);



pageContext.setAttribute("list2",list2);
%>
<% int i=0;%> 


<table border="1">
<tr>
<logic:iterate id="first" name="list2" indexId="index" >
<% i++;%> 

<td><table border="1"><tr><td><bean:write name="index"/></td></tr><tr><td><logic:iterate id="second" name="first">
<bean:write name="second"/>
</logic:iterate></td></tr></table>
</td>

<% if(i%3==0){ 
%> 
<tr>

<%} %>
</logic:iterate>
</tr>

</table>



</body>
</html>

⌨️ 快捷键说明

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