📄 edit_0002ejsp_jsp.java
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class edit_0002ejsp_jsp extends HttpJspBase {
// begin [file="/edit.jsp";from=(9,3);to=(9,21)]
Connection conn;
// end
// begin [file="/edit.jsp";from=(10,3);to=(10,20)]
Statement stmt;
// end
// begin [file="/edit.jsp";from=(11,3);to=(11,17)]
ResultSet rs;
// end
// begin [file="/edit.jsp";from=(12,3);to=(12,16)]
String sname;
// end
static {
}
public edit_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/edit.jsp";from=(0,98);to=(8,0)]
out.write("\r\n<html>\r\n<head>\r\n<title>\r\n修改\r\n</title>\r\n</head>\r\n<body bgcolor=\"#ffffff\">\r\n");
// end
// begin [file="/edit.jsp";from=(8,0);to=(8,43)]
{
String _jspx_qStr = "";
JspRuntimeLibrary.include(request, response, "head.jsp" + _jspx_qStr, out, true);
if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
return;
}
// end
// HTML // begin [file="/edit.jsp";from=(8,43);to=(9,0)]
out.write("\r\n");
// end
// HTML // begin [file="/edit.jsp";from=(9,23);to=(10,0)]
out.write("\r\n");
// end
// HTML // begin [file="/edit.jsp";from=(10,22);to=(11,0)]
out.write("\r\n");
// end
// HTML // begin [file="/edit.jsp";from=(11,19);to=(12,0)]
out.write("\r\n");
// end
// HTML // begin [file="/edit.jsp";from=(12,18);to=(13,0)]
out.write("\r\n");
// end
// begin [file="/edit.jsp";from=(13,2);to=(33,0)]
if (session.getValue("username")!=null) {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
conn=DriverManager.getConnection("jdbc:odbc:song","","") ;
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE) ;
String[] s_name=new String[8];
for (int i=0;i<8;i++) {
s_name[i]=request.getParameter(String.valueOf(i)) ;
if (s_name[i]!=null) {
sname=new String(s_name[i].getBytes("ISO-8859-1"));
break;
}
else {
sname="";
}
}
rs=stmt.executeQuery("select * from singer where sname='"+sname+"'");
if (rs.next()==true) {
String S_type=rs.getString("stype") ;
// end
// HTML // begin [file="/edit.jsp";from=(33,2);to=(34,47)]
out.write("\r\n<form method=\"post\" action=\"savedit.jsp?currow=");
// end
// begin [file="/edit.jsp";from=(34,50);to=(34,80)]
out.print(request.getParameter("currow"));
// end
// HTML // begin [file="/edit.jsp";from=(34,82);to=(35,46)]
out.write("\">\r\n<p>姓名:<input type=\"text\" name=\"sname\" value=\"");
// end
// begin [file="/edit.jsp";from=(35,49);to=(35,70)]
out.print(rs.getString("sname"));
// end
// HTML // begin [file="/edit.jsp";from=(35,72);to=(37,16)]
out.write("\"></p>\r\n<p>类别:<input type=\"radio\" name=\"stype\" value=\"男歌星\"\r\n ");
// end
// begin [file="/edit.jsp";from=(37,18);to=(37,69)]
if (S_type.equals("男歌星")) {out.println("CHECKED");}
// end
// HTML // begin [file="/edit.jsp";from=(37,71);to=(39,16)]
out.write(" >男歌星\r\n <input type=\"radio\" name=\"stype\" value=\"女歌星\"\r\n ");
// end
// begin [file="/edit.jsp";from=(39,18);to=(39,69)]
if (S_type.equals("女歌星")) {out.println("CHECKED");}
// end
// HTML // begin [file="/edit.jsp";from=(39,71);to=(41,16)]
out.write(" >女歌星\r\n <input type=\"radio\" name=\"stype\" value=\"乐队\"\r\n ");
// end
// begin [file="/edit.jsp";from=(41,18);to=(41,68)]
if (S_type.equals("乐队")) {out.println("CHECKED");}
// end
// HTML // begin [file="/edit.jsp";from=(41,70);to=(42,44)]
out.write(" >乐队</p>\r\n<p>拼音:<input type=\"text\" name=\"schr\" value=\"");
// end
// begin [file="/edit.jsp";from=(42,47);to=(42,66)]
out.print(rs.getString("chr"));
// end
// HTML // begin [file="/edit.jsp";from=(42,68);to=(43,46)]
out.write("\"></p>\r\n<p>拼音:<input type=\"text\" name=\"spname\" value=\"");
// end
// begin [file="/edit.jsp";from=(43,49);to=(43,70)]
out.print(rs.getString("pname"));
// end
// HTML // begin [file="/edit.jsp";from=(43,72);to=(44,46)]
out.write("\"></p>\r\n<p>数量:<input type=\"text\" name=\"scount\" value=\"");
// end
// begin [file="/edit.jsp";from=(44,49);to=(44,71)]
out.print(rs.getString("scount"));
// end
// HTML // begin [file="/edit.jsp";from=(44,73);to=(47,0)]
out.write("\"></p>\r\n<p align=\"center\"><input type=\"submit\" value=\"保存\"><input type=\"reset\" value=\"恢复\"></p>\r\n</form>\r\n");
// end
// begin [file="/edit.jsp";from=(47,2);to=(56,0)]
}
rs.close();
stmt.close() ;
conn.close() ;
}
else {
out.println("<p align=\"center\">您没有使用本功能的权限!</p>");
}
// end
// HTML // begin [file="/edit.jsp";from=(56,2);to=(58,49)]
out.write("\r\n<table align=\"center\" width=\"100%\">\r\n<tr><td align=\"center\"><a href=\"index.jsp?currow=");
// end
// begin [file="/edit.jsp";from=(58,52);to=(58,82)]
out.print(request.getParameter("currow"));
// end
// HTML // begin [file="/edit.jsp";from=(58,84);to=(61,0)]
out.write("\">返回</a></td></tr>\r\n</tr>\r\n</table>\r\n");
// end
// begin [file="/edit.jsp";from=(61,0);to=(61,43)]
{
String _jspx_qStr = "";
JspRuntimeLibrary.include(request, response, "tail.jsp" + _jspx_qStr, out, true);
if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
return;
}
// end
// HTML // begin [file="/edit.jsp";from=(61,43);to=(64,0)]
out.write("\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -