change_0002ejsp_jsp.java
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:8k
源码类别:
Jsp/Servlet
开发平台:
VBScript
- import java.sql.*;
- import java.util.*;
- import proj112.*;
- import javax.servlet.*;
- import javax.servlet.http.*;
- import javax.servlet.jsp.*;
- import org.apache.jasper.runtime.*;
- public class change_0002ejsp_jsp extends HttpJspBase {
- // begin [file="/change.jsp";from=(5,0);to=(5,57)]
- // end
- static {
- }
- public change_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=GBK");
- pageContext = _jspxFactory.getPageContext(this, request, response,
- "", true, 8192, true);
- application = pageContext.getServletContext();
- config = pageContext.getServletConfig();
- session = pageContext.getSession();
- out = pageContext.getOut();
- // HTML // begin [file="/change.jsp";from=(0,48);to=(1,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/change.jsp";from=(1,31);to=(2,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/change.jsp";from=(2,27);to=(3,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/change.jsp";from=(3,32);to=(4,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/change.jsp";from=(4,30);to=(5,0)]
- out.write("rn");
- // end
- // begin [file="/change.jsp";from=(5,0);to=(5,57)]
- proj112.dbconn a = null;
- boolean _jspx_speciala = false;
- synchronized (pageContext) {
- a= (proj112.dbconn)
- pageContext.getAttribute("a",PageContext.PAGE_SCOPE);
- if ( a == null ) {
- _jspx_speciala = true;
- try {
- a = (proj112.dbconn) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "proj112.dbconn");
- } catch (ClassNotFoundException exc) {
- throw new InstantiationException(exc.getMessage());
- } catch (Exception exc) {
- throw new ServletException (" Cannot create bean of class "+"proj112.dbconn", exc);
- }
- pageContext.setAttribute("a", a, PageContext.PAGE_SCOPE);
- }
- }
- if(_jspx_speciala == true) {
- // end
- // begin [file="/change.jsp";from=(5,0);to=(5,57)]
- }
- // end
- // HTML // begin [file="/change.jsp";from=(5,57);to=(10,2)]
- out.write("rn<html>rn<body>rnrnrn ");
- // end
- // begin [file="/change.jsp";from=(10,4);to=(10,42)]
- request.setCharacterEncoding("GBK");
- // end
- // HTML // begin [file="/change.jsp";from=(10,44);to=(20,2)]
- out.write("rn<head>rn<title>rn修改学生信息rn</title>rn</head>rnrn<FORM Action="edit.jsp" Method="post" name="edit">rnrn<table align="center" border="2" width="100%" bordercolorlight="#CC99FF" cellpadding="2" bordercolordark="#FFFFFF" cellspacing="2">rn ");
- // end
- // begin [file="/change.jsp";from=(20,4);to=(26,21)]
- String id2=request.getParameter("id");
- //out.print(id);
- String sql="select * from student where stu_name='"+id2+"'";
- ResultSet rs = a.executeQuery(sql);
- while(rs.next()) {
- // end
- // HTML // begin [file="/change.jsp";from=(26,23);to=(29,78)]
- out.write("rn <tr> <td align=center colspan=2><font color=blue size=5><b>修改学生信息</font></td>rnrn <tr align=center><td>姓名:</td><td><INPUT TYPE="text" NAME="stu_name" value=");
- // end
- // begin [file="/change.jsp";from=(29,81);to=(29,96)]
- out.print(rs.getString(1));
- // end
- // HTML // begin [file="/change.jsp";from=(29,98);to=(33,58)]
- out.write("></td>rnt </tr>rn </tr>rn <tr align=center>rnt <td>学号:</td><td><INPUT TYPE="text" NAME="stu_id" value=");
- // end
- // begin [file="/change.jsp";from=(33,61);to=(33,76)]
- out.print(rs.getString(2));
- // end
- // HTML // begin [file="/change.jsp";from=(33,78);to=(36,51)]
- out.write("></td>rnt </tr>rnt<tr align=center><td>rnt 性别:</td><td><INPUT TYPE="text" NAME="sex" value=");
- // end
- // begin [file="/change.jsp";from=(36,54);to=(36,69)]
- out.print(rs.getString(4));
- // end
- // HTML // begin [file="/change.jsp";from=(36,71);to=(39,52)]
- out.write("></td>rnt </tr>rnt <tr align=center><td>rnt 专业:</td><td><INPUT TYPE="text" NAME="dept" value=");
- // end
- // begin [file="/change.jsp";from=(39,55);to=(39,70)]
- out.print(rs.getString(5));
- // end
- // HTML // begin [file="/change.jsp";from=(39,72);to=(42,50)]
- out.write("></td>rnt </tr>rnt <tr align=center><td>rnt 民族:</td><td><INPUT TYPE="text" NAME="mz" value=");
- // end
- // begin [file="/change.jsp";from=(42,53);to=(42,68)]
- out.print(rs.getString(6));
- // end
- // HTML // begin [file="/change.jsp";from=(42,70);to=(45,54)]
- out.write("></td>rnt </tr>rnt <tr align=center><td>rnt 政治面貌:</td><td><INPUT TYPE="text" NAME="zzmm" value=");
- // end
- // begin [file="/change.jsp";from=(45,57);to=(45,72)]
- out.print(rs.getString(7));
- // end
- // HTML // begin [file="/change.jsp";from=(45,74);to=(48,2)]
- out.write("></td>rnt </tr>rnrn ");
- // end
- // begin [file="/change.jsp";from=(48,4);to=(48,18)]
- } rs.close();
- // end
- // HTML // begin [file="/change.jsp";from=(48,20);to=(67,0)]
- out.write("rnrnrn<tr><td align=center colspan=2>rnrn<INPUT align=center TYPE="submit" value="提交"> </td>rn</tr>rn</table>rnrn</form>rnrn<br>rn<br>rn<br>rn<br>rn<p align=center>rn<a href="std.jsp";>返回</a> </p>rn</body>rn</html>rn");
- // 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);
- }
- }
- }