摘要: 如何我们在web.xml定义: spring org.springframework.web.servlet.DispatcherServlet 1 spring *.html那么默认加载文件名字spring-servlet.xml 从webapps WEB-INF文件夹下。如果我们想要自己定义名字和位置: spring org.springframework.web.servlet.DispatcherServlet contextConfigLocation ... 阅读全文
posted @ 2014-01-15 15:54 柠檬Cool 阅读(8633) 评论(0) 推荐(1) 编辑
摘要: public DbDriver(){ //读取WEB-INF的路径 try{ /*String path=this.getClass().getResource("/").getPath()+"config.properties"; path=path.substring(0,path.indexOf("classes")-1)+"/dbConfig.properties";*/ String path=DbDriver.class.getResource("/").getPath(); Str 阅读全文
posted @ 2012-12-25 12:34 柠檬Cool 阅读(9047) 评论(0) 推荐(1) 编辑
摘要: <tr> <td>Partner Name</td> <td><form:input path="name" id="name" maxLength="30" onkeyup="value=value.replace(/\s/g,'')"/><SPAN style="color: #FF0000"> *</SPAN></td> </tr> 阅读全文
posted @ 2012-04-16 10:12 柠檬Cool 阅读(6566) 评论(2) 推荐(1) 编辑
摘要: //2012/03/12,added by king public static void setTime(){ /* SimpleDateFormat sdf = new SimpleDateFormat("HHmmss", Locale.CHINA); Date m_date = new Date(); Calendar c = Calendar.getInstance(); c.setTime(m_date); long lMill = c.getTimeInMillis(); c.setTimeInMillis(lMill); System.out.println( 阅读全文
posted @ 2012-03-28 16:45 柠檬Cool 阅读(6201) 评论(0) 推荐(0) 编辑
摘要: import org.joda.time.DateTime;import java.util.Date;public void setCreatedDate(Date createdDate) {this.createdDate = createdDate;}public void setCreatedDate(final DateTime createdDate) {this.createdDate = null == createdDate ? null : createdDate.toDate();}public DateTime getLastModifiedDate() {retur 阅读全文
posted @ 2012-02-28 17:26 柠檬Cool 阅读(6666) 评论(0) 推荐(0) 编辑
摘要: 在Constants.java中:public static HashMap<String, String> getPhotoTypeMap() {HashMap<String, String> resultMap = new HashMap<String, String>();resultMap.put("jpg", "");resultMap.put("png", "");return resultMap;}@RequestMapping(value = "/upl 阅读全文
posted @ 2012-02-10 09:38 柠檬Cool 阅读(2848) 评论(0) 推荐(0) 编辑
摘要: Function.prototype.method = function(name, func) { this.prototype[name] = func; return this; };String.method('trim', function() { return this.replace(/^\s+|\s+$/g, ''); }); 阅读全文
posted @ 2012-01-30 13:27 柠檬Cool 阅读(278) 评论(0) 推荐(0) 编辑
摘要: e.keycode详解function submitLoginForm(e) {e = window.event || e;if(e.keyCode == 13) {login();}}keycode 8 = BackSpace BackSpacekeycode 9 = Tab Tabkeycode 12 = Clearkeycode 13 = Enterkeycode 16 = Shift_Lkeycode 17 = Control_Lkeycode 18 = Alt_Lkeycode 19 = Pausekeycode 20 = Caps_Lockkeycode 27 = Escape E 阅读全文
posted @ 2012-01-06 10:32 柠檬Cool 阅读(14467) 评论(0) 推荐(0) 编辑