struts2訪問屬性的添加..ActionContext,在excute執行方法中添加..

          public String execute() throws Exception{//在execute方法里面應用全局應用session
                  ActionContext ac=ActionContext.getContext();
                  ac.getApplication().put(
          "app","應用范圍");//往serviceContext里放入
                  ac.getSession().put("session","session應用");//往session里面放
                  ac.put("req""request范圍");//往req里面放..
                  return "success";
              }


          ActionContext ac = ActionContext.getContext();
          ac.

          posted on 2012-06-05 16:28 youngturk 閱讀(553) 評論(0)  編輯  收藏 所屬分類: struts2

          <2012年6月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          1234567

          導航

          統計

          公告

          this year :
          1 jQuery
          2 freemarker
          3 框架結構
          4 口語英語

          常用鏈接

          留言簿(6)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          相冊

          EJB學習

          Flex學習

          learn English

          oracle

          spring MVC web service

          SQL

          Struts

          生活保健

          解析文件

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 景德镇市| 晋宁县| 马关县| 威信县| 嘉祥县| 吉水县| 邛崃市| 通道| 淮滨县| 河池市| 三江| 洛川县| 普定县| 中山市| 临朐县| 新密市| 龙口市| 高阳县| 绥江县| 广昌县| 伽师县| 囊谦县| 神农架林区| 临海市| 东乡族自治县| 车险| 德庆县| 四子王旗| 聂拉木县| 襄垣县| 周口市| 都江堰市| 涿鹿县| 孝昌县| 礼泉县| 馆陶县| 镇赉县| 宁城县| 宜丰县| 青冈县| 温州市|