📄 lookupsong.jsp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><%-- $Id: lookupSong.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.Song" %> <%@ page import="song.SongServices" %> <%! static final String formTitle = "Lookup a song."; %> <%! static final String submitAction = "lookupSong.jsp"; %> <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="*" /> <% //get the (potential) parameters from the HTTP request (the form or URL) String handle = request.getParameter("handle"); String title = request.getParameter("title"); String submit = request.getParameter("submit"); //if form was submitted, go by action specified. //if not submitted, assume a URL parameter. if (submit == null) { if ((handle == null) && (title == null)) { //virgin - display the form %> <%@ include file="lookupSongForm" %> <% } else if (handle != null) { Song tSong = song.songForHandle(handle); if (tSong != null) { %> <%@ include file="showSongTable" %> <% } else { //didn't find %> <p class=normalBodyText> Sorry, couldn't find that song. </p> <% } } else if (title != null) { Song tSong = song.songForTitle(title); if (tSong != null) { %> <%@ include file="showSongTable" %> <% } else { //didn't find %> <p class=normalBodyText> Sorry, couldn't find that song. </p> <% } } } else if ( submit.equals("handle") && (handle != null) ) { Song tSong = song.songForHandle(handle); if (tSong != null) { %> <%@ include file="showSongTable" %> <% } else { //didn't find %> <p class=normalBodyText> Sorry, couldn't find that song. </p> <% } } else if ( submit.equals("title") && (title != null) ) { Song tSong = song.songForTitle(title); if (tSong != null) { %> <%@ include file="showSongTable" %> <% } else { //didn't find %> <p class=normalBodyText> Sorry, couldn't find that song. </p> <% } } %> <p> <br /> <a href="index.jsp">Back to start page</a> </p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -