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

📄 meal.jsp

📁 JavaEE订餐项目的功能:用户登录、用户注册、添加订餐信息、查询订餐、结算、权限验证
💻 JSP
字号:
<%@ page language="java" pageEncoding="gbk"%>
<%@ 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"%>
 
  <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html> 
	<head>
		<title>JSP for MealForm form</title>
		<%
			String path = request.getContextPath();
			
		 %>
	</head>
	<body>
		<h1>订餐系统-添加订餐信息</h1>
		<html:form action="/meal?methodName=save">
			订餐类型 : 
					
						<html:select property="mealType">
							<html:options property="id" labelProperty="name" collection="MealTypeList"/>
						</html:select>
			
			
			
			<html:errors property="mealType"/><br/>
			订餐数量 : <html:text property="num"/><html:errors property="num"/><br/>
			订餐备注 : <html:text property="detail"/><html:errors property="detail"/><br/>
			
			<html:submit>订餐</html:submit>
		</html:form>
		
		<hr>
		
		<form action="<%=path %>/meal.do?methodName=update" method="post">
		<table>
		
		<tr>
			<th>订餐时间</th><th>订餐人</th><th>订餐类型</th><th>订餐数量</th><th>订餐价格</th><th>总计</th><th>备注</th><th>结算</th>
		</tr>
		<logic:iterate id="m" name="MealList">
			<tr>
				<td>
					${m.orderTime }
				</td>
				<td>
					${m.fullName }
				</td>
				<td>
					${m.mealTypeName }
				</td>
				<td>
					${m.num }
				</td>
				<td>
					${m.price }
				</td>
				<td>
					${m.total }
				</td>
				<td>
					${m.detail }
				</td>
				
				<td>
					
					
					<c:if test="${(m.pay==1)}">
						<input type="checkbox" value="${m.id }" name="ids" disabled="disabled">
					</c:if>
					
					<c:if test="${(m.pay==0)}">
						<input type="checkbox" value="${m.id }" name="ids" >
					</c:if>
					
					
				</td>
			</tr>
		
		</logic:iterate>
		
		
		</table>
		
		
		<c:if test="${(SystemMember.privillege=='0')}">
						<input type="submit" value="结算" disabled="disabled">
		</c:if>
		
		<c:if test="${(SystemMember.privillege=='1')}">
						<input type="submit" value="结算" >
		</c:if>
		
		</form>
		
	</body>
</html>

⌨️ 快捷键说明

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