原创 java複習_1

1、一個".java"源文件中是否可以包括多個類(不是內部類)?有什麼限制? 可以有多個類,但只能有一個public 的類,並且public 的類名必須與文件名相一致。 2、說說&和&&的區別。 &和&&都可以用作邏輯與的運算符,表示邏

原创 struts2中BaseAction的模板

package com.mummy.action; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.http.HttpSe

原创 關於Ajax的小結

Ajax 使用瀏覽器內置的一個對象(XmlHttpRequest)向服務器發送請求,服務器返回xml數據或者是文本數據給瀏覽器,然後在瀏覽器端,使用這些數據更新部分頁面,整個過程,頁面無仸何的刷新。 Ajax引擎(即XmlHttpReq

原创 Hibernate,Test模板

package com.cc.bean; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; import org.hibe

原创 Spring:AOP面向切面

AOP:面向切面,是一種編程思想,OOP的延續。將系統中非核心的業務提取出來,進行單獨處理。比如事務、日誌和安全等。這個簡單來說就是可以在一段程序之

原创 JS.簡單的表單驗證

使用onsubmit函數,對錶單中的數據進行驗證。 <!DOCTYPE html> <html> <head> <title>form.html</title> <meta http-equiv="keyword

原创 SpringMVC基本的配置

web.xml配置 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmln

原创 JS.實現類似於淘寶的星級評價

<script type="text/javascript"> $(function(){ $("#ratings td").html("<img src='head.jpg' />").mouseover(function

原创 JS.簡單的表單驗證2

onsubmit的使用 <!DOCTYPE html> <html> <head> <title>confirm.html</title> <meta http-equiv="keywords" content=

原创 JS.簡單的計時器

<!DOCTYPE html> <html> <head> <title>計時器</title> <meta http-equiv="keywords" content="keyword1,keyword2,key

原创 Spring的IOC簡單實現

實體類爲User package com.cc.model; public class User { private String username; private String password; public Strin

原创 jQuery的語法實例

jQuery的語法實例 $(this).hide() 演示 jQuery hide() 函數,隱藏當前的 HTML 元素。 $("#test").hide() 演示 jQuery hide() 函數,隱藏 id="test" 的元素。 $

原创 HibernateError:No Hibernate Session bound to thread, and configuration does not allow creation of

Hibernate和Spring整合。 通過xml文件來配置事務Transaction。出現錯誤: org.hibernate.HibernateException: No Hibernate Session bound to thre

原创 利用HibernateTemplate來操作數據

Spring的配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xs

原创 亂碼問題

springMVC,在web.xml中配置,一般能解決post提交方法的亂碼。 <!-- Character Encoding filter --> <filter> <filter-name>encodingFilter</fi