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)

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 教育| 名山县| 双牌县| 清水县| 道孚县| 石城县| 大荔县| 茌平县| 图木舒克市| 丰城市| 黄梅县| 和田市| 观塘区| 准格尔旗| 南木林县| 高雄市| 南投市| 阿克陶县| 丘北县| 丹巴县| 鹰潭市| 东辽县| 左贡县| 博白县| 大同县| 岐山县| 梁山县| 杭锦后旗| 南溪县| 罗源县| 北碚区| 平陆县| 新干县| 西林县| 琼中| 双辽市| 扎赉特旗| 东明县| 凤山县| 桂平市| 泾阳县|