´«ÖDz¥¿Íjavaѧϰ ½ÌÓý°ì¹«ÏµÍ³2
½ñÌì¼ÌÐøÙ¡ÀÏʦµÄ½ÌÓý°ì¹«ÏµÍ³µÄÂọ́º
1. Ô±¹¤Â¼ÈëµÄ·þÎñÆ÷¶ËµÄ¼òµ¥ÑéÖ¤:
1). ʹÓà struts µÄ validator ¿ò¼Ü
2). ÑéÖ¤¹æÔòͬä¯ÀÀÆ÷¶ËµÄ jQuery µÄ validator ÑéÖ¤.
3). ÒÔ email ×Ö¶ÎΪÀý, ÑéÖ¤¹æÔòΪ·Ç¿Õ, ÇÒ·ûºÏ email ¸ñʽ
2. Ô±¹¤Â¼ÈëµÄ·þÎñÆ÷¶ËµÄ¸´ÔÓÑéÖ¤: ÑéÖ¤µÇ¼ÃûÊÇ·ñÔÚÊý¾Ý¿âÖÐÒѾ´æÔÚ
1). ²ÉÈ¡ÔÚ Action µÄ¶ÔÓ¦·½·¨ÖÐʹÓà ActionMessages µÄ·½·¨.
2). ¿ÉÒÔ²ÉÈ¡ struts µÄÉùÃ÷ʽÒì³£Âð?
3. Ô±¹¤µÄ¼Èë²Ù×÷
1). PY_NAME ÐèÒª¸ù»ù employee_name ×ֶνøÐж¯Ì¬Éú³É, ÐèÒª¶îÍâµÄ¹¤¾ß°ü:
pinyin4j
2). ¿ÉÒÔͨ¹ýϱߵķ½Ê½Îª Employee ¶ÔÏóµÄ position, dept ÊôÐÔ¸³Öµ
Position position = new Position(employee.getPositionid());
Department dept = new Department(employee.getDeptid());
employee.setPosition(position);
employee.setDept(dept);
4. ʹÓà displaytag ¹¤¾ß½øÐзҳ:
1). ÔÚ tomcat µÄ webapps Ŀ¼ÏÂչʾÆäʵÀý.
2). ½â¾ö displaytag ÖÐÎÄÏÔʾµÄÎÊÌâ: ÐÞ¸ÄÆäĬÈϵÄÅäÖÃÎļþ: °Ñ displaytag ±êÇ©¿âÖеÄ
displaytag.properties Îļþ¸´ÖƵ½ conf Ŀ¼ÏÂ, ÐÞ¸ÄÆä¶ÔÓ¦ÐÅÏ¢¼´¿É
5. OpenSessionInView:
1). ΪʲôҪʹÓà OpenSessionInView:
Èô Hibernate ÖÐij¸öÀàµÄij¸öÒýÓÃÊôÐÔ(Ò²°üÀ¨¼¯ºÏÊôÐÔ)²ÉÈ¡ÀÁ¼ÓÔØ²ßÂÔ, Ôò¿ÉÄÜ»á³öÏÖ
org.hibernate.LazyInitializationException
ÔÚÒѾ»ñÈ¡µ½¸Ã¶
Ïà¹ØÎĵµ£º
Ö»Õë¶Ô²»Õý³£µÄÌõ¼þ²ÅʹÓÃÒì³£
Òì³£Ö»Ó¦¸Ã±»ÓÃÓÚ²»Õý³£µÄÌõ¼þ£¬ËüÃÇÓÀÔ¶²»Ó¦±»ÓÃÓÚÕý³£µÄ¿ØÖÆÁ÷¡£
ÏÂÃæÊÇÒ»¸öÓÃÒì³£×÷±éÀú½áÊøÌõ¼þµÄÀÄÓÃÒì³£µÄÀý×Ó£º
//horrible abuse of exceptions. Don't ever do this!
try{
int i=0;
while(true)a[i++].f();
}catch(ArrayIndexOutOfBoundsException e){
......
<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......
Debug͸ÊÓͼ
http://www.cnblogs.com/Jamesliang/archive/2010/01/09/1643188.html
µ±µã»÷Debug°´Å¥Ê±£¬Eclipse»áÌáʾÄã½øÈë Debug͸ÊÓͼ¡£¿ÉÒÔÔÚÓÒÉÏ·½Expressions´°¿Úµã»÷Êó±êÓÒ¼üÔÚµ¯³ö²Ëµ¥ÖÐÑ¡Ôñ Add Watch Expression »òÕßµã»÷ÈçÏÂͼËùʾ°´Å¥Ôò»á³öÏÖ£¬Ìí¼Ó±í´ïʽ´°¿Ú¡£Äã¿ÉÒÔÊäÈëÄã ......
import java.util.regex.Matcher;
import java.util.regex.Pattern;
1£ºÕâ¸öÊÇÄõ½Ò»¸ö×Ö·ûÈ¡µÃÀïÃæµÄͼÏñµØÖ··µ»ØÒ»¸öList
public static List<String> getImgStr(String htmlStr){
String img=""; &n ......
Integer n1 = new Integer(1);
Integer n2 = new Integer(1);
System.out.println(n1==n2); // false
Integer n1 = new Integer(3);
Integer n2 = new Integer(3);
System.out.println(n1.equals(n2)); //true
equals()ĬÈÏÒ²ÊDZȽÏreference£¬µ«ÊÇJavaÖеÄclass¸²¸ÇÁËequals()·½·¨ ......