最赞回答 / 豆芽丶
Connection conn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/micro_message?useUnicode=true&characterEncoding=UTF-8","root","123456");这行这样写就可以了
2018-02-18
老师,你讲课真的有一套,讲课幽默,有图有证明,隔空互动,繁琐的内容简单化,去除听课者的心里恐惧和枯燥,荣幸听见你的视频。为你鼓掌!
2018-02-11
乱码问题:
1.页面如果全是乱码,在talk.jsp顶部加上<%@ page language="java" pageEncoding="utf-8" %>
2.只有"正在与公众号对话"和"发送"两处地方是中文,其余乱码,在talk.js引入的地方加上charset="UTF-8"
<script type="text/javascript" charset="UTF-8" src="..........."></script>
1.页面如果全是乱码,在talk.jsp顶部加上<%@ page language="java" pageEncoding="utf-8" %>
2.只有"正在与公众号对话"和"发送"两处地方是中文,其余乱码,在talk.js引入的地方加上charset="UTF-8"
<script type="text/javascript" charset="UTF-8" src="..........."></script>
2018-02-09
可以把mainForm一起提交,servlet不做修改
<a href="javascript:judgeDelete(${message.id})">删除</a>
function judgeDelete(id) {
if(confirm("确定要删除吗")){
document.getElementById("mainForm").action = "DeleteOneServlet.action?id=" + id;
document.getElementById("mainForm").submit();
}
<a href="javascript:judgeDelete(${message.id})">删除</a>
function judgeDelete(id) {
if(confirm("确定要删除吗")){
document.getElementById("mainForm").action = "DeleteOneServlet.action?id=" + id;
document.getElementById("mainForm").submit();
}
2018-02-08
看完了,老师讲的太好了,不仅讲了mybatis,很容易理解,而且还附带讲了其他扩展知识点,让大家学习了很多知识,以前有些不明白的东西却在这里弄明白了。太感谢老师了。谢谢!
2018-02-08
直接拷源码包里的log4j.properties会出错;这里面的内容直接为老师的就不会错了。
log4j.rootLogger=DEBUG,Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
log4j.logger.org.apache=INFO
log4j.rootLogger=DEBUG,Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
log4j.logger.org.apache=INFO
2018-02-04