birthday.jsp

来自「java web 开发,Java Xml 编程指南书籍源码」· JSP 代码 · 共 40 行

JSP
40
字号
<html><head><title>Birthday JSP/Bean/DBHandler/Mail </title></head><body><%@ page import="java.util.*, MyNa.utils.*" errorPage="errorpage.jsp" %><jsp:useBean id="bbean" scope="session" class="birthday.BirthdayBean" /><jsp:setProperty name="bbean" property="*" /><% bbean.processRequest(request); %><%  bbean.doCommand(); // usually, this is all we need after setting properties  String msgtext="";  // accumulate messages here, if needed.  String select=bbean.getJspcmd();  if("logout".equals(select)){ %>     goodbye, come again soon.<% }else if("error".equals(select)){ %>   oops, something went wrong: <%= bbean.getErrorString() %>   Click your back button and try again, or tell us.<% }else if("change".equals(select)){ %>   We changed <%= bbean.getNumberAffected() %> rows.   <%@ include file="continue.jsp" %><% }else if("msgsent".equals(select)){ %>    Congratulations, you sent a message.   <%@ include file="continue.jsp" %><% }else if("list".equals(select)){ %>     <%@ include file="list.jsp" %><% }else if("birthdaylist".equals(select)){ %>     <%@ include file="birthdaylist.jsp" %><% }else { %>  Unimplemented command [<%= select %>]; how did this happen?<% } %></body></html>

⌨️ 快捷键说明

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