Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

jspÑéÖ¤µÇ½

<%@ page contentType="text/html; charset=gb2312" %>

<%@ page language="java" %>

<%@ page import="com.mysql.jdbc.Driver" %>

<%@ page import="java.sql.*" %>

<%
String driverName="com.mysql.jdbc.Driver";
String userName="root";
String userPasswd="123456";
String dbName="hoot";
String tableName="userinfo";
String url="jdbc:mysql://localhost/"+dbName+"?user="+userName+"&password"
                +  "="+userPasswd;

Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection=DriverManager.getConnection(url);
Statement statement = connection.createStatement();

        String Username=request.getParameter("Username");
        String Password=request.getParameter("Password");
 
        out.println(Username);
        out.println(Password);
String sql="SELECT * from userinfo where " +
                "username= 'Username' and password = 'Password'";
    &nbs


Ïà¹ØÎÊ´ð£º

JSPÖеÄÖÐÎÄ×Ö·û´¦Àí

<%@ page contentType = "text/html;charset =gb2312"%>

<%!
    public String codeToString(String str)
  {
    String s =str;
  &nbs ......

jspÔõô»ñµÃÒ³ÃæµÄÍêÕûµØÖ·

°üÀ¨²ÎÊý
String path = request.getContextPath();
String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"; ......

jspÌø×ª

ÎÒµãºóÍËʱÊǿհ×Ò³Ãæ
ÐèˢвÅÄÜÏÔʾ
Õâ¸öÔõô´¦Àí°¡
Çë´ó¼Ò°ï°ïæ
°ÑÎÊÌâ˵µÄÏêϸһЩ£¬ÕâÑùÓÐÖúÓÚÎÊÌâµÄ»Ø¸´£¬¼°´ð°¸µÄ׼ȷÐÔ£¡

ÎÒ¾õµÃÊÇÄãµÄä¯ÀÀÆ÷Æ÷µÄÎÊÌâ°É£¬ÎÒÒÔǰÓöµ½¹ýÕâÑùµÄÎÊÌ⣬°ÑIEµÄËùÓÐÊôÐÔÖ ......

jsp ÂÒÂë ÇóÖú

±¾ÈËÔÚ±àдjsp½çÃæÊ±£¬³öÏÖÂÒÂë¡£ÎҵIJ˵¥Ä£¿éÊÇÒýÓõÄÍⲿÎļþ ´úÂ룺 <%@ include file="head.txt" %>
ÔÚÏÔʾʱ£¬²Ëµ¥ÀïÃæµÄ×ÖÈ«ÊÇÂÒÂ룬¶øÒ³ÃæÖ÷ÌåµÄ×ÖÌåÕý³£¡£
head.txtµÄ´úÂëÈçÏ£º
......

jspÊý×Öת»»ºº×Ö

ÎÒÃǵÄÐèÇóºÜ¼òµ¥£¬´«¹ýÀ´3ת»»³ÉÈý¾Í³É¡£ÎÊÎÊ´ó¼ÒÓÐûÓÐ×î¼òµ¥µÄ°ì·¨¡£×îºÃÄÜÔÚÒ³ÃæÖÐÖ±½Ó´¦ÀíÁË£¬²»ÐоÍÓÃjava~ллÁË~

1LÇ¿ÈË!!


ÓÃjava´¦Àí½ðÇ®Java code:

public class TestMoney {
public sta ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ