ΪUrlRewriteµÄ¶à¸öXMLÅäÖÃÎļþµÄ¼ÓÔØÌṩģºýÆ¥Åä
ΪUrlRewriteµÄ¶à¸öXMLÅäÖÃÎļþµÄ¼ÓÔØÌṩģºýÆ¥Åä
@for&ever 2009-11-27
֮ǰдÁËһƪÎÄÕ£¬¡¶ÐÞ¸ÄUrlRewriterʹÆäÓɵ¥ÅäÖÃÎļþµ½Ö§³Ö¶àÅäÖÃÎļþ¡·£¬ÍøÖ·http://blog.csdn.net/forandever/archive/2009/08/07/4423808.aspx £¬¶Ô UrlRewriteµÄ´úÂë½øÐÐÁ˼òµ¥Ð޸ģ¬
ÎÄÕÂÖеÄÄܹ»Ö§³Ö¶à¸öÅäÖÃÎļþµÄÇé¿ö¡£
×î½ü£¬ÔÚÏîÄ¿ÖÐʹÓþõµÃ»¹ÊDz»Ì«·½±ã£¬Ã¿´ÎÔö¼ÓÒ»¸öÅäÖÃÎļþ£¬¶¼ÐèÒªÐÞ¸Äweb.xml £¬ÓÚÊÇ£¬ÔÚÉÏ´ÎÐ޸ĵĻù´¡ÉÏ£¬¼ÌÐøÐ޸ĴúÂ룬Ôö¼ÓÄ£ºýÆ¥Åäij¸öĿ¼ÏµÄÒ»¶¨¹æÔòµÄÎļþµÄ¹¦ÄÜ¡£
Ò»¡¢ÐèÇó£º
Äܹ»ÊµÏÖÔÚ web.xml ÖÐͨ¹ý * µÄ·½Ê½ÅäÖã¬Ò»´Î¼´¿ÉÅäÖúÃһϵÁеÄÅäÖÃÎļþ¡£ÀýÈ磺
ÔÚweb.xmlÖÐÈçÏÂÅäÖãº
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
<init-param>
<param-name>confPath</param-name>
<param-value>/WEB-INF/urlrewrite.xml /WEB-INF/conf/urlrewrite/abc*.xml</param-value>
</init-param>
</filter>
ÒªÄܹ»ÊµÏÖ¼ÓÔØÎļþ/WEB-INF/urlrewrite.xmlºÍ/WEB-INF/conf/urlrewrite/Ŀ¼ÏÂËùÓÐÎļþÃûÆ¥Åäabc*.xml¸ñʽµÄÎļþµÄ¹¦ÄÜ¡£
¶þ¡¢ÊµÏÖ£º
Ïà¹ØÎĵµ£º
Ò»¸öXMLÎļþͨ³£°üº¬ÎļþÍ·ºÍÎļþÌåÁ½´ó²¿·Ö
1. ÎļþÍ·
XMLÎļþÍ·ÓÉXMLÉùÃ÷ÓëDTDÎļþÀàÐÍÉùÃ÷×é³É¡£ÆäÖÐDTDÎļþÀàÐÍÉùÃ÷ÊÇ¿ÉÒÔȱÉٵģ¬¹ØÓÚDTDÉùÃ÷½«ÔÚºóÐøµÄÄÚÈÝÖнéÉÜ£¬¶øXMLÉùÃ÷ÊDZØÐëÒªÓеģ¬ÒÔʹÎļþ·ûºÏXMLµÄ±ê×¼¹æ¸ñ¡£
ÔÚÇ°ÃæµÄFlowers.xmlÎļþÖеĵÚÒ»ÐдúÂ뼴ΪXMLÉùÃ÷£º
<?xml °æ ......
/**
* ÃèÊö£ºÊý¾Ý¿â³õʼ»¯»ù±¾Àà
*
* @×÷Õß ÍõȺ
* @´´½¨ÈÕÆÚ 2010-04-08
* @ÐÞ¸ÄÈË xxx
* @ÐÞ¸ÄÈÕÆÚ xxx
* @¼ì²éÈË xxx
* @¼ì²éÈÕÆÚ xxx
*/
import java.sql.SQLException;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.oumasoft.bstmanage.ibatis.SqlMapConfig;
import com.oumasof ......
×î½üÔÚsina¿´nbaµÄÎÄ×ÖÖ±²¥µÄʱºò£¬¶ÔÍøÕ¾ÓÒϽǵÄÄÇÒ»¸öÁÄÌì´°¿Ú²úÉúÐËȤ£¬¾Í¾ö¶¨×Ô¼ºÒ²×öÒ»¸ö¡£
ÉÏÍø²é²é×ÊÁÏ£¬ÕâÑùµÄÁÄÌìÊÒÎ޷ǾÍÊÇÓû§ÊäÈëÊý¾Ý´«µ½·þÎñÆ÷±£´æ£¬È»ºóÓû§Ò³ÃæÔÙʵʱµØ´ÓÊý¾Ý¿âÈ¡³öÊý¾Ý£¬ÏÔʾÔÚÒ³ÃæÉÏ£¬¼´¿ÉÍê³ÉÒ»´ÎÁÄÌì²Ù×÷¡£
Ê×ÏÈÎÒ¶¨ÒåÁËÒ»¸öxmlÎļþ£¬ÓÃÓÚ±£´æÓû§ ......
Ê×ÏÈ£¬¼ÓÔØTXTʵÀý£º
´úÂ룺
ËäÈ»ÊǺܾɵÄÒ»Ì׽̳̣¬¿ÉÊǺÜʵÓã¬ËùÒÔÎÒ°ÑËü·ÅÔÚÕâ¡£
£¨×¢Ò⣺¿´´úÂëµÄʱºòÁôÒâһϽڵãµÄÓ÷¨£ºmyXML.childNodes[0].childNodes[0].childNodes[0]....xml½ÚµãµÄµØ·½¡££©
Ò»¡¢½¨Á¢XML¶ÔÏó£º
var myXML = new XML();
¶þ¡¢ÒýÓÃXMLÎļþ£º
myXML.load("data.xml");
Èý¡¢ºöÂÔ¿Õ¸ñ£º
my ......
ÏÖÔÚÎÒÃÇÔÝÇÒʹÓÓ¼Çʱ¾”À´´´½¨ÎÒÃǵÄXMLÎļþ°É¡£ÏÈ¿´Ò»¸öXMLÎļþ£º
¡¡¡¡Àý1
¡¡¡¡¡´?xml version="1.0" encoding="gb2312" ?¡µ
¡¡¡¡¡´²Î¿¼×ÊÁÏ¡µ
¡¡¡¡ ¡´Êé¼®¡µ
¡¡¡¡ ¡´Ãû³Æ¡µXMLÈëÞ«½â¡´/Ãû³Æ¡µ
¡¡¡¡ ¡´×÷Õß¡µÕÅÈý¡´/×÷Õß¡ ......