Java:Struts ÏîÄ¿ÖÐweb.xmlÎļþÅäÖÃ
web.xmlÎļþ¶ÔÓÚÅäÖÃÈκÎJava WebÓ¦Óö¼±ØÐèµÄ¡£
£¨1£©ÅäÖÃStrutsµÄActionServlet
<servlet><!--ÔªËØÀ´ÉùÃ÷ActionServlet-->
<servlet-name><!--ÔªËØ£ºÓÃÀ´¶¨ÒåServletµÄÃû³Æ-->
<servlet-class><!--ÔªËØ:ÓÃÀ´Ö¸¶¨ServletµÄÍêÕûÀàÃû-->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
</servlet>
»¹ÒªÅäÖÃ<servlet-mapping>ÔªËØ,ËüÓÃÀ´Ö¸¶¨ActionServlet¿ÉÒÔ´¦ÀíÄÄЩURL
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
×¢Òâ:(1)<servlet-mapping>ºÍ<servlet>ÖеÄ<servlet-name>?</servlet-name>µÄÒªÌîдһÖ£¬Ëü¾ÍÊÇÒ»¸ùÏߣ¬°Ñ<servlet-mapping>ºÍ<servlet>Áª½ÓÔÚÒ»ÆðµÄ¡£
(2)ÔÚStruts¿ò¼ÜÖÐÖ»ÄÜÓÐÒ»¸öServlet,ÒòΪServletÖ§³Ö¶àÏ̡߳£¶ø<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>ÖеÄActionServletÊÇÔÚStruts.jar°üÖеÄ.ÔÚµ¼ÈëStruts°üʱ»áµ¼Èë¡£
(3)ÔÚÏÔʾ²ãÒÔ*.doÌá½»µÄ£¬¶¼»á¹ý¸öServlet¡£*.do¿ÉÒÔ¸Äд³ÉÄãÏëÒªµÄÈκÎÐÎʽ¡£ÀýÈç:/do/*
À©Õ¹ (1)ÎÒÃÇ¿ÉÒԼ̳Рorg.apache.struts.action.ActionServlet µÃµ½ÎÒÃÇ¿ÉÒÔÀ©ÔʵÄ×ÓÀ࣬ÔÚ×ÓÀàÖÐÖØдһ¸ö·½·¨init()¡£Õâʱ<servlet-class>?</servlet-class>Öеģ¿ÊÇÎÒÃÇн¨µÄÀàµÄ·¾¶£¬Í¬ÑùÖ»ÄÜ´æÔÚÒ»¸ö¡£
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
TomcatÖÐweb.xmlÎļþµÄÏêϸ˵Ã÷
<?xml version="1.0" encoding="GB2312"?>
<!--
Web.xmlÒÀ´Î¶¨ÒéÁËÈçÏÂÔªËØ: <web-app> <display-name></display-name> ¶¨ÒåÁËWEBÓ¦ÓõÄÃû×Ö
<description></description>
Ïà¹ØÎĵµ£º
ѧϰJava´ó¸ÅÒ»¸öÔÂÁË£¬ÓÉÓÚÒÔÇ°ÓÐc/c++»ù´¡£¬ËùÒÔÔÚJ2SE²¿·ÖµÄѧϰÊDZȽϿìµÄ£¬½ñÌìÔÚÂÛ̳¿´µ½Ò»¸öÍøÓѵÄÇóÖúÌû£¬Òª½«Ó²ÅÌÉÏÁ½¸öÎļþºÏ²¢ÎªÒ»¸ö²¢É¾³ýÔÎļþ£¬ÓÚÊDZãдÁ˲âÊÔ³ÌÐò¡£ºóÀ´ÔÚɾ³ýÎļþʱ£¬ÓÉÓÚûÓаѶµ½ÎļþÉϵÄÊä³öÁ÷¹Ø±Õ£¬µ¼ÖÂÔõôҲÎÞ·¨É¾³ý¡£¶øÇÒÒ»Ö±²é²»³öÔÒò£¬ºóÀ´ÒÔΪÊÇdelete·½·¨Ö»ÄÜɾ³ý¿ÕÎļþ£¬Ò»g ......
½ñÌìÊÇÉϿεĵÚÒ»Ì죬ûÏëµ½µÚÒ»Ìì¾Í½²ÁËÄÇô¶àµÄ¶«Î÷£¬¿´ÁË¿´ÀÏʦµÄPPT£¬·¢ÏÖ¶«Î÷ËäÈ»¶à£¬µ«ÊǶ¼²»ÄÑÀí½â£¬»¹ÊDZȽÏÈÝÒ׵ġ£¹þ¹þ£¬µÃÒæÓÚÔÚ´«ÖÇ»ù´¡°àµÄ´¸Á¶£¬Ó¢Ã÷µÄ¾ö¶¨¾ÍÊÇ´ÓͷѧÆð¡£
¸Õ¹ýÍê´º½ÚÀÏ·½µÄ»°»¹ÊÇ˵µÄ²»ÊǺÜÁ÷Àû°¡£¨Òª¼ÓÇ¿ÆÕͨ»°Á·Ï°à¸ ......
1.ÔÚJSPÖÐÉú³É¶¯Ì¬XML
¿ÉÒÔʹÓÃJSPÉú³ÉXML,ʹÓÃCSS»òÕßXSLת»»ºÍÏÔʾXML;
Ö»ÒªÔÚ¾²Ì¬µÄXMLÎĵµÄ£°åÖмÓÈëJava´úÂëºÍJSP±ê¼Ç£¬XML¾Í¿ÉÒÔÓо²±ä¶¯£¬²úÉú¶¯Ì¬µÄÄÚÈÝ£¬Éú³ÉXMLÎĵµµÄ·½·¨ºÜ¼òµ¥£¬Ö»ÐèÒªÔÚÎļþÖÐʹÓÃÖ¸Áîcontenttype,Èç<%@ page contenttype="text/xml"%>£»
ÔÚXMLÎĵµÖÐͬÑù¿ÉÒÔʹ ......
ÏÂÃæÕâ¶Î´úÂëÊǾ¹ý´úÂë·ÖÎö¹¤¾ßRational Software Analyser ·ÖÎö¹ýµÄ£¬¸Ã¹¤¾ß¹ØÓÚJavaµÄ¹æÔòÄ¿Ç°ÊÇ541Ìõ£¬ÊµÊô¿Á¿Ì¡£Ð´¶Î¹æ·¶µãµÄJava´úÂëÈÝÒ×ô£¡
/**
*
* @author zhp
*
* @version 1.0
*/
package com.rsar;
import java.util.Date;
/**
*
* @author zhp
  ......
JavaÐéÄâ»ú²ÎÊý·ÖΪ»ù±¾²ÎÊýºÍÀ©Õ¹²ÎÊý£¬±¾ÎÄÖ÷ÒªÏêϸ½éÉÜ»ù±¾²ÎÊýÖи÷¸ö²ÎÊýµÄÒâÒåÒÔ¼°ÆäÓ÷¨¡£
Òª²é¿´JavaÐéÄâ»úÓÐÄÄЩ¿ÉÑ¡µÄ²ÎÊýÅäÖ㬿ÉÒÔÖ±½ÓÔËÐÐjavaÃüÁÏÔʾÈçÏÂЧ¹û£º
ϱ߷ֱð½éÉÜÿ¸ö²ÎÊýµÄÓ÷¨£º
1. -client£¬-server
ÕâÁ½¸ö²ÎÊýÓÃÓÚÉèÖÃÐéÄâ»úʹÓúÎÖÖÔËÐÐģʽ£¬clientģʽÆô¶¯±È½Ï¿ì£¬µ«ÔËÐÐʱÐÔÄܺÍÄÚ´ ......