Çó½ÌÒ»¸öÈëÃż¶µÄjspÎÊÌâ - Java / Web ¿ª·¢
ÎÒµÄÊý¾Ý¿âÁ¬½ÓÎÊÌ⣬µ«Ö´ÐÐÒ»¸öÊéÉϵijÌÐòʱ×ÜÊDZ¨´í£¬¸÷λ´óÏÀ°ïæ´¦ÀíÏÂ
´úÂëÈçÏ£º
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ page import="java.sql.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>²éѯϵͳ</title>
</head>
<body>
<%
String dbDriver="com.microsoft.sqlserver.jdbc.SQLServerDriver";
//»ñµÃÓû§µÄÊäÈëÐÕÃû
String studentname=new String(request.getParameter("studentname").getBytes("iso8859-1"),"GB2312");
//ÉèÖÃÊý¾Ý¿âµÄurl£¬databasename±íʾÊý¾Ý¿âÃû³Æ
String url="jdbc:sqlserver://localhost:1433;DatabaseName=test";
String user="sa";
String pwd="123456";
String query="select * from student where Stu_Name like '% "+studentname+" %' ";
Connection conn=null;
Statement stmt=null;
ResultSet rs=null;
try{
//¼ÓÔز¢×¢²ájdbcÇý¶¯
Class.forName(dbDriver);
conn= DriverManager.getConnection(url,user,pwd);
stmt=conn.createStatement();
rs=stmt.execute
Ïà¹ØÎÊ´ð£º
JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
JSPÒ³Ã潫²ÎÊýPOST¸øservlet
ÒªÇóÈçÏÂ;
1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......
ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......
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& ......
ÎÒдÁ˸öjspÒ³Ã棬Ȼºó¸Ä¶¯ÁËһϣ¬¸Ä¶¯µÄÄÚÈݾÍÊÇÔÚjspÒ³ÃæµÄjsº¯ÊýÀï¼ÓÁ˸öalert()Óï¾ä£¬µ«ÊÇÎÒ·ÃÎÊÕâ¸öÒ³Ãæʱ£¬ËÀ»î¶¼ÊÇÔÀ´Ò³ÃæµÄÄÚÈÝ£¬ÎÒ¼ÓÁ˺ܶàalertº¯Êý»¹ÊÇû¸Ä¶¯Ç°µÄÒ³ÃæÄÚÈÝ£»tomcatÖØÆôÁË£¬Ò²ÖØв¿ÊðÕâ ......
ÏÖÔÚ²»ÏëÓÃ<a> </a> ±êÇ© £¬ÒòΪµã»÷ºó»á³öÏÖÒ³ÃæÖض¨Î»£¬¸øÎÄ×Ö¼ÓÉÏcssÑùʽ¾Í¿ÉÒÔ¿´ÆðÀ´ ÊÇhrefÔõôʵÏÖÕâÑùµÄcss
text-decoration:underline; cursor:hand;
ÒýÓÃ
text-decoration:underline; cur ......