ÎÒµÄtomcat6.0.20 jdbcÇý¶¯ÊÇ5.1µÄ Ç°´ÎÎÒÕÕ×ÅÍøÉϵÄÅäÖþͿÉÒÔÁË Ò²²»ÓÃŪʲô»·¾³±äÁ¿ Õâ´Î¾Í²»ÐÐÁË ÎÒŪÁË»·¾³±äÁ¿Ò²²»ÐÐ tomcatÏÂÃæûÓÐcomm ËùÒÔÎÒ°Ñmysql-connector-java-5.1.8-bin.jar·Åµ½D:\Tomcat 6.0\libÏÂÃæ ͬʱÔÚD:\jdk1.6\libÏÂÃæÒ²·ÅÁËÒ»¸ö ¸Ã·ÅµÄÎÒÒ²·ÅÁË ²»¸Ã·ÅµÄµØ·½Ò²·Å µ«ÊÇ»¹ÊDz»ÐÐ ÏÂÃæÊÇËýµÄÒ ......
ÎÒÓõÄÊÇeclipse-jee-galileo-SR1-win32 tomca6.0 Mysql5.1 ÏÂÔØÏÂÀ´µÄÇý¶¯ÊÇmysql-connector-java-5.1.10-bin.jar ÎÒ½«Ëü·ÅÔÚÁËD:\Ŀ¼Ï²¢Ð´½øÁËϵͳ±äÁ¿calsspath »¹°ÑËü·Å½øÁËeclipse¹¤×÷ÇøµÄ ÏîÄ¿\WebContent\WEB-INF\libÖÐ tomcat°²×°Ä¿Â¼ÏµÄlibÖÐÒ²·Å½øÈ¥ÁË µ«ÊdzÌÐòÔËÐнá¹ûÒ»Ö±ÊÇ£º
HTTP Status 404 -
......
ÊÇÒ»Ìõ¸üвÙ×÷£º
Java code:
¡¡
private Integer bonus = 0;
public Integer getBonus() {
return bonus;
}
public void setBonus(Integer bonus) {
this.bonus = bonus;
}
String SQL = "UPDATE users SET bonus = bonus" + this.getBonus()
+ " WHERE id='&qu ......
jspÁ¬½ÓmysqlÊý¾Ý¿â²éѯ£¬²¢ÔÚÒ³ÃæÏÔʾ Öм䲻ÓÃstruts£¬ÔõôʵÏÖ£¬ÇóÀý×Ó
javabean ×öÁ¬½Ó
jsp Ò³ÃæʵÀý»¯Àà
jsp Ò³ÃæÏÔʾÊý¾Ý
<%@ page contentType="text/html;
charset=gb2312" language="java"
import="java.sql.*"%>
<meta http-equiv="Con ......
ÓÃjsp×ö¶«Î÷¸øÍêÈ«²»¶®mysqlµÄÈËÓ㬿ÉÊDZ¸·ÝʱֻÓпÕÎļþ£¬ÕâÊÇʲôÇé¿ö£¬
×îºÃÓÐÔ´´úÂ룬лл
Æäʵ±¸·ÝµÄ¹ý³ÌÎÒÏë´ó¸ÅÊÇÕâÑùµÄ£º
½«±íAÖеÄÊý¾Ý·Åµ½ArrayListÖУ¬È»ºó½«Õâ¸öArrayListÖеÄÊý¾ÝÔÙ´æµ½±íBÖС£
ËùÒÔ¶ÔÖмä¹ý³ÌÕâ¸öArrayListÊÇ·ñΪ¿ÕÊǽâ¾öÄãÎÊÌâµÄ¹Ø¼ü¡£
Äã˵µÄÊÇÃüÁîÐб¸·Ý°É£¿Ñϸñ°´ÕÕÃüÁî²»Ó ......
jspÌá½»Ò³±àÂëÊÇUTF-8£¬MYSQL¿âÒ²ÊÇUTF-8,ΪʲôÌá½»ÁËÖÐÎÄ×Ö·ûÔÚÊý¾Ý¿âÀï±ä³ÉÂÒÂëÁËÄØ£¿
ÕâÖÖÎÊÌâÔõô½â¾ö£¿Ð»Ð»
ÁíÍ⣬JSPµ¯³ö¶Ô»°¿ò£¨±ÈÈ絯³ö¡°XXXÉóºËͨ¹ý¡±ÏÂÃæ¸úÈ·¶¨°´Å¥£©ºÍ·µ»ØÉÏÒ»Ò³ÒÔ¼°×ªµ½ÐÂURLÓ¦¸ÃÔõôдÄØ£¿Ð»Ð»
jspÌá½»µ½µÃservletÖеÄdoPost»òÊÇdoGet·½·¨ÖУ¬È¡²ÎÊý֮ǰÏÈÖ´ÐÐrequest.setCh ......