JSP Êý¾Ý¿âÎÊÌâ - Java / Web ¿ª·¢
´óÏÀÃÇ°ïÎÒ¿´¿´ÎªÊ²Ã´ÌîÈë±íµ¥µÄÊý¾Ý²»ÄܲåÈëÊý¾Ý¿â
ÁíÒ»¸öÒ³ÃæÄܶÁ³öÀïÃæµÄÊý¾Ý
<%@ page language="java" contentType="text/html; charset=GBK"%>
<%@ page import="java.sql.*,javax.naming.*,javax.sql.*" %>
<html>
<head>
<title>´´½¨±í²¢²åÈë¼°ÐÞ¸ÄÊý¾Ý</title>
</head>
<body>
<%String Student_id= request.getParameter("Student_id");
String Student_name= request.getParameter("Student_name");
String sex= request.getParameter("sex");
String Student_class= request.getParameter("Student_class");
String Student_grade=request.getParameter("Student_grade");
Connection con = null;
try {
// ¼ÓÔØODBCÇý¶¯
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// ͨ¹ýÇý¶¯¹ÜÀíÆ÷£¨DriverManager£©»ñµÃÁ¬½Ó
con = DriverManager.getConnection("jdbc:odbc:mysj",
"sa","123");
out.println("<h2>´´½¨student±í³É¹¦£¡</h2><br>");
// ²åÈëÊý¾Ýµ½student±í
String Sql="insert into student(Student_id,Student_name,sex,Student_class,"
+ "Student_grade) values ('" + Student_id + "','"
+ Student_name+"','&q
Ïà¹ØÎÊ´ð£º
JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
JSPÒ³Ã潫²ÎÊýPOST¸øservlet
ÒªÇóÈçÏÂ;
1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......
insert into [ScholarshipManagement].[dbo].[department] ([department],[specialization] ,[grade]) output inserted.departmentID values(? ,? ,? )
ÇëÎÊ´ó¸çÃÇÕâ¸ösql Óï¾äÓ¦¸ÃÓÃJavaÀïµÄÄǸöÊý¾Ý¿â²Ù×÷·½·¨£¿ ......
ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾ÀíʹÓÃ
»¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä,
ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò,
ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾÌá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......
ÎÒдÁ˸öjspÒ³Ã棬Ȼºó¸Ä¶¯ÁËһϣ¬¸Ä¶¯µÄÄÚÈݾÍÊÇÔÚjspÒ³ÃæµÄjsº¯ÊýÀï¼ÓÁ˸öalert()Óï¾ä£¬µ«ÊÇÎÒ·ÃÎÊÕâ¸öÒ³Ãæʱ£¬ËÀ»î¶¼ÊÇÔÀ´Ò³ÃæµÄÄÚÈÝ£¬ÎÒ¼ÓÁ˺ܶàalertº¯Êý»¹ÊÇû¸Ä¶¯Ç°µÄÒ³ÃæÄÚÈÝ£»tomcatÖØÆôÁË£¬Ò²ÖØв¿ÊðÕâ ......