📄 editsong.jsp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><%-- $Id: editSong.jsp,v 1.1 2002/07/18 09:08:03 per_nyfelt Exp $ --%><html><head> <%@ page info="song profile page" %> <%@ page language="java" %> <%@ page import="webapp.WebApp" %> <%@ page import="song.SongServices" %> <%! static final String submitButtonAction = "Update"; %> <%! static final String submitAction = "editSong.jsp"; %> <%! static final String formName = "Update song information."; %> <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" /> <% //load the specified song into the bean from the database String handle = request.getParameter("handle"); String submit = request.getParameter("submit"); //request to load a song for editing if ((handle != null) && (submit == null)){ song.songForHandle(handle); // show the song properties form w/ data so they can update. %> <%@ include file="editSongForm" %> <% } else { //form submittal //load the song based on title song.songForHandle(handle); //set variables from form into bean %> <jsp:setProperty name="song" property="*" /> <% //try to update database boolean success = song.processUpdateRequest(request); if (success){ out.println("<p class=normalBodyText>"); out.println("song.Song information updated."); out.println("</p>"); %> <%@ include file="showSongTable" %> <% } else { //invalid song. try again with hints. out.println("<p class=normalBodyText>"); out.println("song.Song information update 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 + -