DWRÖÐJava·½·¨µÄ²ÎÊý¼°·µ»ØÖµÉÏƪ
DWRÊÇÒ»¸ö¿ò¼Ü£¬¼òµ¥µÄ˵¾ÍÊÇÄܹ»ÔÚjavascriptÖ±½Óµ÷ÓÃjava·½·¨£¬¶ø²»±Øȥдһ´ó¶ÑµÄjavascript´úÂë¡£ËüµÄʵÏÖÊÇ»ùÓÚajaxµÄ£¬¿ÉÒÔʵÏÖÎÞË¢ÐÂЧ¹û¡£
ÍøÉÏÓв»ÉÙDWRµÄÀý×Ó£¬µ«´ó¶¼Ö»ÊÇijÖÖ·½·¨µÄµ÷Ó㬱¾ÎÄÖ»ÔÚʹÓòãÃæÉϽéÉÜDWR£¬²¢²»Éæ¸ü¶àµÄ¼¼ÊõÓëÉè¼Æ£¬ÆäÄ¿µÄÊÇÈóõѧÕßÄܹ»ºÜ¿ìµÄѧ»á¸÷ÖÖjava·½·¨ÔÚjavascriptÖÐÊÇÈçºÎµ÷Óõġ£
±¾ÎÄÒÔDWR 1.1 Ϊ»ù´¡£¬¶ÔÓÚDWR 2.0£¬ÒòΪ»¹Ã»ÓÐÕýʽ·¢²¼°æ£¬¹Ê²»×ö½éÉÜ¡£
Ò»¡¢DWRÅäÖÃƪ֮web.xml
1 ¡¢×îСÅäÖÃ
Xml´úÂë
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
2¡¢µ±ÎÒÃÇÏë¿´DWR×Ô¶¯Éú³ÉµÄ²âÊÔÒ³£¨Using debug/test mode£©Ê±£¬¿ÉÔÚservletÅäÖÃÖмÓÉÏ
Xml´úÂë
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
Õâ¸ö²ÎÊýDWRĬÈÏÊÇfalse¡£Èç¹ûÑ¡Ôñtrue£¬ÎÒÃÇ¿ÉÒÔͨ¹ýhttp://localhost:port/app/dwr ¿´µ½Ä㲿ÊðµÄÿ¸öDWR class¡£²¢ÇÒ¿ÉÒÔ²âÊÔjava´úÂëµÄÿ¸ö·½·¨ÊÇ·ñÔËÐÐÕý³£¡£ÎªÁË°²È«¿¼ÂÇ£¬ÔÚÕýʽ»·¾³ÏÂÄãÒ»¶¨°ÑÕâ¸ö²ÎÊýÉèΪfalse¡£
3¡¢¶à¸ödwr.xmlÎļþµÄÅäÖÃ
¿ÉÄÜÓм¸ÖÖÇé¿ö£¬ÎÒÃÇÒ»Ò»Áо١£Ò»¸öservlet£¬¶à¸ödwr.xmlÅäÖÃÎļþ£»¶à¸öservlet£¬Ã¿¸öservlet¶ÔÓ¦Ò»¸ö»ò¶à¸ödwr.xmlÅäÖ
Ïà¹ØÎĵµ£º
javaÉú³ÉÑéÖ¤Âë
ÓкܶàÖÖ·½Ê½£¬ÔÚÍøÉÏÒ²Óкܶà´úÂ룬µ«ÊÇÄÇЩÉú³ÉµÄЧ¹û£¬¸Ð¾õ¶¼²»ÊÇÌرðºÃ£¬ËùÒÔÎÒÔÚËûÃǵĻù´¡ÉϸÄÁ¼ÁËһЩ¡£
µ«ÄÜ»¹¿ÉÒÔÓÃjmagick ,Éú³ÉºÜ¶àºÜìŵÄÑéÖ¤Âë¡£¹ýÁ½ÌìÑо¿Ï¡£ÏÈ°Ñ×î½ü¸ÄµÄÕâ¸ö·¢²¼Ï¹©ÅóÓÑÃDzΡ£
¿ÉÒÔÏÈ¿´¿´ÑùÀý¡£×î½üÔÚ×öÕâ¸öÍøÕ¾¡£´ó¼ÒÓÐÐËȤ¿ÉÒԽн»Á÷¡£Ô¼»á360 ÍøÖ·: www.yue ......
win7ϵͳÏÂJava»·¾³±äÁ¿µÄÅäÖà Jdk°æ±¾Îª1.6
´ò¿ª¿ØÖÆÃæ°å->Óû§ÕÊ»§->¸ü¸ÄÎҵĻ·¾³±äÁ¿
±äÁ¿Ãû£ºJAVA_HOME
±äÁ¿Öµ£ºD:\Program Files\Java\jdk1.6.0_12(ÕâÖ»ÊÇÎÒµÄJDK°²×°Â·¾¶)
±äÁ¿Ãû£ºPath
ÔÚ±äÁ¿ÖµµÄ×îÇ°Ãæ¼ÓÉÏ£º%JAVA_HOME%\bin;£¨ÈôÒѾÓÐPathÏÎÞÐëÁíÍâР......
JavaµÄ×Ö·ûÀàÐͲÉÓõÄÊÇUTF-16±àÂ뷽ʽ¶ÔUnicode±àÂë±í½øÐбíʾ¡£ÆäÖÐÒ»¸öcharÀàÐ͹̶¨2Bytes£¨16bits£©¡£Ê×ÏÈÏȽéÉÜÒ»ÏÂUnicode±àÂë±íºÍUTF-16±àÂëËã·¨£º
Unicode±àÂë±íµÄרҵÊõÓ
´úÂëµã (code point): Ö¸ÔÚUnicode±àÂë±íÖÐÒ»¸ö×Ö·ûËù¶ÔÓ ......
ÔÚûÓкúõØÑÐÏ°ÃæÏò¶ÔÏóÉè¼ÆµÄÉè¼Æģʽ֮ǰ£¬ÎÒ¶ÔJava½Ó¿ÚºÍJava³éÏóÀàµÄÈÏʶ»¹ÊǺÜÄ£ºý£¬ºÜ²»¿ÉÀí½â¡£
¸ÕѧJavaÓïÑÔʱ£¬¾ÍºÜÄÑÀí½âΪʲôҪÓнӿÚÕâ¸ö¸ÅÄËä˵ÊÇ¿ÉÒÔʵÏÖËùνµÄ¶à¼Ì³Ð£¬¿ÉÒ»¸öÖ»Óз½·¨Ãû£¬Ã»Óз½·¨ÌåµÄ¶«Î÷£¬ÎÒʵÏÖËüÓÖÓÐʲôÓÃÄØ£¿ÎÒ´ÓËüÄÇʲôҲµÃ²»µ½£¬³ýÁËһЩ·½·¨Ãû£¬ÎÒÖ±½ÓÔÚ¾ßÌåÀàÀï¼ÓÈëÕâЩ·½ ......
ÔÚJava
ÓïÑÔÖУ¬ abstract class ºÍinterface
ÊÇÖ§³Ö³éÏóÀà
¶¨
ÒåµÄÁ½ÖÖ»úÖÆ¡£ÕýÊÇÓÉÓÚÕâÁ½ÖÖ»úÖƵĴæÔÚ£¬²Å¸³ÓèÁËJavaÇ¿´óµÄ ÃæÏò¶ÔÏóÄÜÁ¦¡£abstract
classºÍinterfaceÖ®¼äÔÚ¶ÔÓÚ³éÏóÀඨÒåµÄÖ§³Ö·½Ãæ¾ßÓкܴóµÄÏàËÆÐÔ£¬ÉõÖÁ¿ÉÒÔÏ໥Ìæ»»£¬Òò´ËºÜ¶à¿ª·¢ÕßÔÚ½ø
ÐгéÏóÀඨÒåʱ¶ÔÓÚabstract
classºÍinterfaceµÄÑ¡Ô ......