今天终于写完了一个 可以水平下拉菜单和垂直下拉菜单之间随意切换的网页换肤程序,它综合应用了水平下拉菜单,垂直下拉菜单,网页换肤等技巧.
这个程序需要用到三个文件,一个是h.css,用作水平下拉菜单的样式文件,另一个是v.css,用作垂直下拉菜单的样式文件,最后一个就是包含下拉菜单内容的网页文档test.html.
test.html文件内容:
这个程序需要用到三个文件,一个是h.css,用作水平下拉菜单的样式文件,另一个是v.css,用作垂直下拉菜单的样式文件,最后一个就是包含下拉菜单内容的网页文档test.html.
test.html文件内容:
复制内容到剪贴板 程序代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
复制内容到剪贴板 程序代码
WARN - Exception thrown whilst processing POSTed parameters
java.net.SocketException: Connection reset
java.net.SocketException: Connection reset
该错误出现位置在Action返回JSP页面时,代码没有发现什么问题,在网上查到了原因:
引用内容
I've discovered that this is a bug with Tomcat 5.5.23. (http://
issues.apache.org/bugzilla/show_bug.cgi?id=40960). I upgraded to
Tomcat 6.0.13 and that solved the problem. Hope that helps someone
Jeff
issues.apache.org/bugzilla/show_bug.cgi?id=40960). I upgraded to
Tomcat 6.0.13 and that solved the problem. Hope that helps someone
Jeff
Tags: TOMCAT
常常会在程序中看见这样的情况,页面中会有很多遍历出的记录都是放在文本框中,如
ID1 NAME1 PASSWD1
ID2 NAME2 PASSWD2
ID3 NAME3 PASSWD3
...
这样的记录如果每条后面都放着一个更新按钮,这样对于Struts取得Form确实方便不少,但未免让可用性受到局限。如果做出点击一次,全部更新,这个我考虑了很久,也试了很多方法,如果非要用Struts来实现这样的功能未免牵强。因为Form是在Struts的RequestProcessor中创建并封装起来的,别人不好对它进行干涉或操作。
这样原本方便的Form变成了阻碍,在这里我考虑用servlet中常用的形式来做这个功能,如:
ID1 NAME1 PASSWD1
ID2 NAME2 PASSWD2
ID3 NAME3 PASSWD3
...
这样的记录如果每条后面都放着一个更新按钮,这样对于Struts取得Form确实方便不少,但未免让可用性受到局限。如果做出点击一次,全部更新,这个我考虑了很久,也试了很多方法,如果非要用Struts来实现这样的功能未免牵强。因为Form是在Struts的RequestProcessor中创建并封装起来的,别人不好对它进行干涉或操作。
这样原本方便的Form变成了阻碍,在这里我考虑用servlet中常用的形式来做这个功能,如:
复制内容到剪贴板 程序代码
String [] ids = request.getParameterValues("id");
String [] mcs= request.getParameterValues("mc");
String [] mcs= request.getParameterValues("mc");
08-03
26
Hibernate 的 "SQL insert, update or delete failed (row not found)" 异常
作者:Java伴侣 日期:2008-03-26
在借助hibernate[1] 执行更新操作,包括插入(insert)/修改(update)/删除(delete)操作的过程中,如果数据库一方返回的update count 与 hibernate 所预期的 count[2] 不同,那么hibernate 的Batcher 就会抛出异常:
HibernateException("SQL insert, update or delete failed (row not found)");
下面是一段完整的错误信息:
[ERRor][tcpConnection-8080-3] - Could not synchronize database state with session
org.springframework.orm.hibernate.HibernateSystemException: SQL insert, update or delete failed (row not found); nested exception is net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)
net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)
HibernateException("SQL insert, update or delete failed (row not found)");
下面是一段完整的错误信息:
[ERRor][tcpConnection-8080-3] - Could not synchronize database state with session
org.springframework.orm.hibernate.HibernateSystemException: SQL insert, update or delete failed (row not found); nested exception is net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)
net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)
通过调用JS脚本来实现的Lightbox效果我想大家都很熟悉了,
我在econsultant.com看到了介绍Lightbox类似程序的帖子,发出来共享一下。
Lightbox JS
: original; a simple, unobtrusive script used to overlay images on the current page.
Greased Lightbox
: Greasemonkey/Creammonkey/Opera user script designed to enhance browsing on websites that link to images such as Google Image Search, Flickr, Wikipedia, Facebook, MySpace, and deviantART.
GreyBox
: A pop-up window that doesn’t suck.
我在econsultant.com看到了介绍Lightbox类似程序的帖子,发出来共享一下。
Lightbox JS
: original; a simple, unobtrusive script used to overlay images on the current page.
Greased Lightbox
: Greasemonkey/Creammonkey/Opera user script designed to enhance browsing on websites that link to images such as Google Image Search, Flickr, Wikipedia, Facebook, MySpace, and deviantART.
GreyBox
: A pop-up window that doesn’t suck.