chengji_0002ejsp_jsp.java
资源名称:JSP02.rar [点击查看]
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:9k
源码类别:
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 chengji_0002ejsp_jsp extends HttpJspBase {
- // begin [file="/chengji.jsp";from=(5,0);to=(5,57)]
- // end
- static {
- }
- public chengji_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="/chengji.jsp";from=(0,48);to=(1,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/chengji.jsp";from=(1,31);to=(2,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/chengji.jsp";from=(2,27);to=(3,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/chengji.jsp";from=(3,32);to=(4,0)]
- out.write("rn");
- // end
- // HTML // begin [file="/chengji.jsp";from=(4,30);to=(5,0)]
- out.write("rn");
- // end
- // begin [file="/chengji.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="/chengji.jsp";from=(5,0);to=(5,57)]
- }
- // end
- // HTML // begin [file="/chengji.jsp";from=(5,57);to=(13,1)]
- out.write("rn<html>rn<head>rn<title>rnchengjirn</title>rn</head>rn<body bgcolor="#ffffff">rn ");
- // end
- // begin [file="/chengji.jsp";from=(13,3);to=(18,1)]
- String xuehao=(String)session.getAttribute("id");
- String sql="";
- sql="SELECT b.xqh,b.kch,b.kcm,b.xf,b.zjjs,a.成绩,a.重修成绩 FROM chengji b,成绩关联 a where b.kch=a.课程号 and a.stu_id='"+xuehao+"'";
- ResultSet rs=a.executeQuery(sql);
- // end
- // HTML // begin [file="/chengji.jsp";from=(18,3);to=(19,55)]
- out.write("rn 姓名: <font color="#0033FF">");
- // end
- // begin [file="/chengji.jsp";from=(19,58);to=(19,91)]
- out.print(session.getAttribute("stu_name") );
- // end
- // HTML // begin [file="/chengji.jsp";from=(19,93);to=(19,154)]
- out.write(" </font> 学号: <font color="#0033FF">");
- // end
- // begin [file="/chengji.jsp";from=(19,157);to=(19,184)]
- out.print(session.getAttribute("id") );
- // end
- // HTML // begin [file="/chengji.jsp";from=(19,186);to=(34,7)]
- out.write("</font><br>rn <hr><br>rn <center><font color="red">成绩表如下:<br>rn <p align="center">rn <table width="100%" cellspacing="0" cellpadding="4" rules="all" bordercolor="#CC9966" border="1" id="dg_rxkb" style="background-color:White;border-color:#CC9966;border-width:1px;border-style:None;width:100%;border-collapse:collapse;">rn <tr bgcolor="#9dcaf4">rn <td align="center"><font color="990000">学期号</font></td>rn <td align="center"><font color="990000">课程号</font></td>rn <td align="center"><font color="990000">课程名</font></td>rn <td align="center"><font color="990000">学分</font></td>rn <td align="center"><font color="990000">主讲教师</font></td>rn <td align="center"><font color="990000">成绩</font></td>rn <td align="center"><font color="990000">重修成绩</font></td>rnrn </tr>rn ");
- // end
- // begin [file="/chengji.jsp";from=(34,9);to=(35,7)]
- while(rs.next())
- {
- // end
- // HTML // begin [file="/chengji.jsp";from=(35,9);to=(37,26)]
- out.write("rn <tr>rn <td align="center">");
- // end
- // begin [file="/chengji.jsp";from=(37,29);to=(37,48)]
- out.print(rs.getString("xqh"));
- // end
- // HTML // begin [file="/chengji.jsp";from=(37,50);to=(38,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/chengji.jsp";from=(38,29);to=(38,48)]
- out.print(rs.getString("kch"));
- // end
- // HTML // begin [file="/chengji.jsp";from=(38,50);to=(39,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/chengji.jsp";from=(39,29);to=(39,48)]
- out.print(rs.getString("kcm"));
- // end
- // HTML // begin [file="/chengji.jsp";from=(39,50);to=(40,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/chengji.jsp";from=(40,29);to=(40,47)]
- out.print(rs.getString("xf"));
- // end
- // HTML // begin [file="/chengji.jsp";from=(40,49);to=(41,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/chengji.jsp";from=(41,29);to=(41,49)]
- out.print(rs.getString("zjjs"));
- // end
- // HTML // begin [file="/chengji.jsp";from=(41,51);to=(42,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/chengji.jsp";from=(42,29);to=(42,47)]
- out.print(rs.getString("成绩"));
- // end
- // HTML // begin [file="/chengji.jsp";from=(42,49);to=(43,26)]
- out.write("</td>rn <td align="center">");
- // end
- // begin [file="/chengji.jsp";from=(43,29);to=(43,49)]
- out.print(rs.getString("重修成绩"));
- // end
- // HTML // begin [file="/chengji.jsp";from=(43,51);to=(46,4)]
- out.write("</td>rnrn </tr>rn ");
- // end
- // begin [file="/chengji.jsp";from=(46,6);to=(46,8)]
- }
- // end
- // HTML // begin [file="/chengji.jsp";from=(46,10);to=(51,0)]
- out.write("rn </table>rnrn</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);
- }
- }
- }