struts2-20070511-2

          I changed the result-name from '/myexample/HelloWorld.jsp' to '/myexample/a.pdf' and add a new file in  myexample folder.But no use.

          In the documents ,there are some words: 

          Based on the mappings loaded from the struts.xml, a given result-name may select a page (as in this example), another action, or some other web resource (image, PDF).  

          I have not known why yet.

          --------------------------------------------
          Using Tags
          ------------------------------------
          Linking->
          <ul>
             
          <li>
                
          <s:url id="url" action="HelloWorld">
                   
          <s:param name="request_locale">en</s:param>
                
          </s:url>
                
                
          <s:a href="%{url}">English</s:a>
                
             
          </li>
             
          <li>
                
          <s:url id="url" action="HelloWorld">
                   
          <s:param name="request_locale">es</s:param>
                
          </s:url>
                
                
          <s:a href="%{url}">Espanol</s:a>
             
          </li>
          </ul>
          %{url} will be evaluated to the url defined with the s:url tag.

          There are three kinds of link
          · Resource links
          <link href="<s:url value="/css/tutorial.css"/>
            rel="stylesheet" type="text/css"/>

          ·Direct links
          <li><href="<s:url action="Register"/>">Register</a></li>
          ·Links with paramenters
          <s:url id="url" action="Welcome">
            
          <s:param name="request_locale">en</s:param>
          </s:url>
          <s:a href="%{url}">English</s:a>
          The param tag will add the parameter "?request_locale=en" to the Welcome Action URL.
          Any number of parameters can be added to the URI by adding more param etags.
          ----------------------------
          Why the uri is http://localhost:8080/blank/myexample/HelloWorld.action.   Where the 'myexample' is defined?
          How this code works?
          <action name="*" >
            
          <result>/tutorial/{1}.jsp</result>
          </action>


          posted on 2007-05-11 17:06 deepbluesea 閱讀(164) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2007年5月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          公告

          MSN:zzlljj8833@hotmail.com lava:5832911

          常用鏈接

          留言簿(1)

          隨筆分類(9)

          隨筆檔案(18)

          文章分類(1)

          文章檔案(1)

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 娄底市| 桐柏县| 平塘县| 台安县| 南郑县| 罗源县| 合江县| 定西市| 高邮市| 澎湖县| 扎兰屯市| 资兴市| 台山市| 西畴县| 天峻县| 崇礼县| 海宁市| 诸暨市| 白沙| 宽城| 东源县| 安阳县| 右玉县| 千阳县| 德化县| 长岛县| 正宁县| 荥阳市| 时尚| 花垣县| 河西区| 嘉定区| 从江县| 黄冈市| 昌宁县| 右玉县| 桦川县| 孝感市| 茂名市| 雷山县| 仁寿县|