📄 addsong.jsp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><%-- $Id: addSong.jsp,v 1.1 2002/07/18 09:08:03 per_nyfelt Exp $ --%><html><head> <%@ page info="song addition page" %> <%@ page language="java" %> <%@ page import="webapp.WebApp" %> <%@ page import="song.SongServices" %> <%! static final String submitButtonAction = "Add"; %> <%! static final String submitAction = "addSong.jsp"; %> <%! static final String formName = "Add a song."; %> <title>H A N D L E</title> <link rel="STYLESHEET" type="text/css" href="style/style.css"></head><body class=normalBody> <jsp:useBean id="song" scope="page" class="webapp.SongBean" /> <jsp:setProperty name="song" property="*" /> <% //Determine if form was submitted, or JSP is to collect info first-time // null fields if the form was not submitted, // just display form, don't try to validate and update database. String title = request.getParameter("title"); if (title == null){ %> <%@ include file="editSongForm" %> <% } else { //handle the form submission here boolean success = song.isValidForAdd(); if(success){ success = song.processAddRequest(request); } if (success) { out.println("<p class=normalBodyText>"); out.println("New song <" + song.getTitle() + "> created.<br/>"); out.println("</p>"); %> <%@ include file="showSongTable" %> <% } else { out.println("<p class=normalBodyText>"); out.println("New song creation FAILED.<br/>"); out.println("Sorry, but there was a problem with the information you entered.<br/>"); out.println(song.getMessage() + "<br/>" ); out.println("Please review your entries and then resubmit.<br/>"); out.println("</p>"); %> <%@ include file="editSongForm" %> <% } } %> <p> <br /> <a href="index.jsp">Back to start page</a> </p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -