摘要:
如何我们在web.xml定义: spring org.springframework.web.servlet.DispatcherServlet 1 spring *.html那么默认加载文件名字spring-servlet.xml 从webapps WEB-INF文件夹下。如果我们想要自己定义名字和位置: spring org.springframework.web.servlet.DispatcherServlet contextConfigLocation ... 阅读全文
摘要:
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 阅读全文
摘要:
<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> 阅读全文
摘要:
//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( 阅读全文
摘要:
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 阅读全文
摘要:
在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 阅读全文
摘要:
Function.prototype.method = function(name, func) { this.prototype[name] = func; return this; };String.method('trim', function() { return this.replace(/^\s+|\s+$/g, ''); }); 阅读全文
摘要:
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 阅读全文