??xml version="1.0" encoding="utf-8" standalone="yes"?>99riav视频一区二区,国产久一道中文一区,国产三区二区一区久久http://www.aygfsteel.com/wansong/category/45576.htmlwansongzh-cnThu, 23 Dec 2010 18:52:26 GMTThu, 23 Dec 2010 18:52:26 GMT60jquery通过struts2hQ返回json数据Q在jsp面形成二联动下拉列表http://www.aygfsteel.com/wansong/articles/341344.htmlw@ns0ngw@ns0ngWed, 22 Dec 2010 13:40:00 GMThttp://www.aygfsteel.com/wansong/articles/341344.htmlhttp://www.aygfsteel.com/wansong/comments/341344.htmlhttp://www.aygfsteel.com/wansong/articles/341344.html#Feedback0http://www.aygfsteel.com/wansong/comments/commentRss/341344.htmlhttp://www.aygfsteel.com/wansong/services/trackbacks/341344.html

w@ns0ng 2010-12-22 21:40 发表评论
]]>
struts2 json jquery 集成详解http://www.aygfsteel.com/wansong/articles/340943.htmlw@ns0ngw@ns0ngFri, 17 Dec 2010 00:02:00 GMThttp://www.aygfsteel.com/wansong/articles/340943.htmlhttp://www.aygfsteel.com/wansong/comments/340943.htmlhttp://www.aygfsteel.com/wansong/articles/340943.html#Feedback0http://www.aygfsteel.com/wansong/comments/commentRss/340943.htmlhttp://www.aygfsteel.com/wansong/services/trackbacks/340943.htmljquery.xml2json.js    


struts2 json jquery 集成详解
文章分类:Web前端
1.      从以下网址http://code.google.com/p/jsonplugin/downloads/list下蝲JSON插g的JAR包(新版本是0.32Q,q加到工E的相应目录下。从如下|址http://docs.jquery.com/Downloading_jQuery下蝲jquery所需文g?下蝲E_版本Q不然会出现莫名其妙的错?
2.      配置相应的xml文gQؓajaxh提供数据Q?
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
    <package name="sajax" extends="json-default" namespace="/book">
        <action name="getAjaxBookChannelList" method="getAjaxBookChannelList" class="bookChannelAction">
            <result type="json" />
        </action>
        <action name="getAjaxBookCategoryListByChannelID" method="getAjaxBookCategoryListByChannelID" class="bookChannelAction">
            <result type="json" />
        </action>
    </package>
</struts>
配置有两处与通常的action配置不同Q一处是扩展了json-defaultQ?json-default”是在jsonplugin-0.30.jar包里的struts-plugin.xml中定义的Q文件内容如下:
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
    <package name="json-default" extends="struts-default">
        <result-types>
            <result-type name="json" class="com.googlecode.jsonplugin.JSONResult"/>
        </result-types>
        <interceptors>
            <interceptor name="json" class="com.googlecode.jsonplugin.JSONInterceptor"/>
        </interceptors>
    </package>
</struts>

另一处是定义了返回类型ؓjson<result type="json" />Q会response中的q回数据转化为json对象?
3Q在Action中的定义。定义返回对象,q添加getQsetҎ。返回的数据可以Ҏ需要格式成json形式(json格式如{1:test,2:test})Q比如ؓ二列表提供填充内容的的数据Q在面需要进行遍历,做成json形式的,在页面遍历时也会比较方便。Action代码Q部分)如下Q?
   
    public String getAjaxBookChannelList() {
       StringBuffer sb = new StringBuffer();
       bookChannelList = bookService.getBookChannelList();
       if (bookChannelList.size() > 0) {
           int j = bookChannelList.size();
           sb.append("{");
           for (int i = 0; i < j; i++) {
              BookChannel bc = (BookChannel) bookChannelList.get(i);
              sb.append(bc.getId());
              sb.append(":");
              sb.append("\"");
              sb.append(bc.getName());
              sb.append("\"");
              if (i != (j - 1))
                  sb.append(",");
           }
           sb.append("}");
       }

       strAjaxChannel = sb.toString();//q回的数?

       return Action.SUCCESS;
    }


4面操作。Jquery中已l提供几供ajaxh的方法,如果q回的是json对象Q用jQuery.getJSON(url,[data],[callback])会比较方便,

jQuery.getJSON(url,[data],[callback]) 通过 HTTP GET h载入 JSON 数据?

q回?
XMLHttpRequest

参数
url (String) : 发送请求地址?
data (Map) : (可? 待发?Key/value 参数?
callback (Function) : (可? 载入成功时回调函数?

参数部分Q浏览器的缓存是以url为标识的Q如果url相同会用缓存中的数据,如果不想使用~存Q可以在参数中加入一个随机数?

jQuery.each(obj,callback)
通用例遍ҎQ可用于例遍对象和数l?
参数
object (Object) : 需要例遍的对象或数l?
callback (Function) : (可? 每个成员/元素执行的回调函数?
回调函数拥有两个参数Q第一个ؓ对象的成员或数组的烦引,W二个ؓ对应变量或内宏V?
Jquery操作下拉列表d选项的方法ؓ: $(“# categoryId”)[0].options.add(option);

面代码如下Q部分)Q?
<. language="." type="text/." src="/.s/jquery-1.2.2.js"></.>
<. language=".">
       function fillChannel(id){
              var url = "/book/getAjaxBookChannelList.action";
              $.getJSON(url,{ran:Math.random()},function(json){
                     if(json.strAjaxChannel.length > 0){
                            var obj = .('(' + json.strAjaxChannel + ')');
                            $.each(obj,function(i,n){
                          option = new Option(n,i);
                          if(i==id)option.selected=true;
                         document.getElementById("channellistId").options.add(option);
                      });
                      option = new Option("全部频道",999);
                      if(id == 999)option.selected=true;
                      document.getElementById("channellistId").options.add(option); 
                  }
               else{
                           option = new Option("暂无频道");
                           document.getElementById("channellistId").options.add(option);
                  }
                     }
              );    
       }
       function fillCategory(chid,bid){
              document.getElementById("categoryId").options.length=1;
              var url = "/book/getAjaxBookCategoryListByChannelID.action";
              var cid = 0;
              if(chid > 0){
                     cid = chid;
              }
              else{
                     cid = document.getElementById("channellistId").value;
              }
              $.getJSON(url,{channelID:cid,ran:Math.random()}, function(json){
        //参数为频道ID及随机数Qfunction(json)为回调函敎ͼ其中json为取到的q回数据
                       if(json.strAjaxCategory.length > 0){
                                   var obj = .('(' + json.strAjaxCategory + ')');//json文本转化为json对象Q以便于遍历
                                   $.each(obj,function(i,n){  //jquery中的遍历ҎQ?
                                 option = new Option(n,i);
                                 if(i==bid)option.selected=true;
                                document.getElementById("categoryId").options.add(option);
                             });
                                  option = new Option("全部分类","-3");
                                  if(bid ==-3)option.selected=true;
                                  document.getElementById("categoryId").options.add(option);
                                  //jquery的方法ؓ:$(“# categoryId”)[0].options.add(option);
                  }
                  else{
                           if(cid == 999){
                                  option = new Option("全部分类","-1");
                                  document.getElementById("categoryId").options.add(option);                              
                           }
                           else{
                                  option = new Option("暂无分类");
                                  document.getElementById("categoryId").options.add(option);
                           }
                  }
                     }
              );           
       }

       function fillSelect(chid,cid){
              fillChannel(chid);
              fillCategory(chid,cid);
       }
</.>
<body <s:if test="bookCategory.bookchannelId >0">onLoad="fillSelect(<s:property value="bookCategory.bookchannelId"/>,<s:property value="bookCategory.id"/>);"</s:if><s:if test="bookCategory==null">onLoad="fillChannel(0);"</s:if>>

作品cd
         <select name="channellistId" id="channellistId" onChange="fillCategory(<s:if test="bookCategory.bookchannelId >0">0,</s:if><s:property value="categoryId"/>);"><option>选择频道</option></select>
         <select name="categoryId" id="categoryId"><option>选择分类</option></select>


直接讉Khttp://manager.17k.com/book/getAjaxBookChannelList.action
得到如下内容Q?
{"ajaxBookCategoryListByChannelID":"success","ajaxBookChannelList":"success","bcID":0,"bchID":0,"bookCategory":null,"bookCategoryAllList":null,"bookCategoryByChannelID":"success","bookCategoryByID":null,"bookCategoryList":null,"bookCategoryListModel":null,"bookChannel":null,"bookChannelList":[{"createdate":"2008-07-09T10:23:36","id":1,"name":"畅销l典","prefix":"changxiao","status":0},{"createdate":"2008-07-09T10:24:03","id":2,"name":"玄奇","prefix":"yy","status":0},{"createdate":"2008-07-09T10:24:25","id":3,"name":"都市׃","prefix":"dushi","status":0},{"createdate":"2008-07-09T10:24:38","id":4,"name":"历史军事","prefix":"ss","status":0},{"createdate":"2008-07-09T10:24:54","id":5,"name":"x时?,"prefix":"nvxing","status":0},{"createdate":"2008-07-09T10:25:11","id":6,"name":"游戏竞技","prefix":"dongman","status":0},{"createdate":"2008-07-09T10:25:24","id":7,"name":"恐怖灵?,"prefix":"kongbu","status":0},{"createdate":"2008-07-09T10:25:35","id":8,"name":"文化C","prefix":"www","status":0},{"createdate":"2008-07-09T10:25:46","id":9,"name":"l管励志","prefix":"www","status":0}],"channelID":0,"currentPage":0,"info":"","msg":"","pageSize":0,"srcID":0,"strAjax":"","strAjaxCategory":"","strAjaxChannel":"{1:\"畅销l典\",2:\"玄奇\",3:\"都市׃\",4:\"历史军事\",5:\"x时\",6:\"游戏竞技\",7:\"恐怖灵异\",8:\"文化C\",9:\"l管励志\"}","tarID":0,"theBookCategory":"success","theBookChannel":"success","toID":0}




关于jsonplugin序列化的几点Q?
a.对于不想被序列化的属性,可以在他的getҎ前加注释Q?nbsp;     @JSON(serialize=false)
b.对于x变jsonl果属性名U的Q可以在他的getҎ前加注释@JSON(name="属性名")
c. 带有transient修饰W与没有GetterҎ的字D(fieldQ都不会被串行化为JSON?


w@ns0ng 2010-12-17 08:02 发表评论
]]>
OGNL practicehttp://www.aygfsteel.com/wansong/articles/336339.htmlw@ns0ngw@ns0ngThu, 28 Oct 2010 00:26:00 GMThttp://www.aygfsteel.com/wansong/articles/336339.htmlhttp://www.aygfsteel.com/wansong/comments/336339.htmlhttp://www.aygfsteel.com/wansong/articles/336339.html#Feedback0http://www.aygfsteel.com/wansong/comments/commentRss/336339.htmlhttp://www.aygfsteel.com/wansong/services/trackbacks/336339.html
http://www.opensymphony.com/ognl/
http://www.opensymphony.com/ognl/api

Ognl.getValue("#root.{? #this.parentId == "
     + userOrganId + "}",
     Constant.AllORGANS);

w@ns0ng 2010-10-28 08:26 发表评论
]]>
struts2 struts2 比较http://www.aygfsteel.com/wansong/articles/334981.htmlw@ns0ngw@ns0ngWed, 13 Oct 2010 00:33:00 GMThttp://www.aygfsteel.com/wansong/articles/334981.htmlhttp://www.aygfsteel.com/wansong/comments/334981.htmlhttp://www.aygfsteel.com/wansong/articles/334981.html#Feedback0http://www.aygfsteel.com/wansong/comments/commentRss/334981.htmlhttp://www.aygfsteel.com/wansong/services/trackbacks/334981.html

w@ns0ng 2010-10-13 08:33 发表评论
]]>
struts 1 validatehttp://www.aygfsteel.com/wansong/articles/332660.htmlw@ns0ngw@ns0ngWed, 22 Sep 2010 14:11:00 GMThttp://www.aygfsteel.com/wansong/articles/332660.htmlhttp://www.aygfsteel.com/wansong/comments/332660.htmlhttp://www.aygfsteel.com/wansong/articles/332660.html#Feedback0http://www.aygfsteel.com/wansong/comments/commentRss/332660.htmlhttp://www.aygfsteel.com/wansong/services/trackbacks/332660.html <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
    </plug-in>
   


validation.xml:::::::::::::
<formset>
        <!-- An example form -->
        <form name="crudForm">
            <field property="name" depends="required">
                <arg key="crudform.name"/>
            </field>
        </form>
    </formset>

jsp::::::::::

<html:javascript formName="crudForm" dynamicJavascript="true" staticJavascript="true"/>

<div id="crudDetailDialog">
 <html:form action="/save.do" method="POST" styleId="crudForm" >
  <div id="crudDetailValidationMessages"><html:errors/></div>
  
  CrudId:<html:text property="crudId" />
  Name: <html:text property="name" />
  
  <input name="submit" type="submit" value='login' >
 </html:form>
</div>


form:::::::::::::::::::::::
CRUDForm extends ValidatorForm {

w@ns0ng 2010-09-22 22:11 发表评论
]]>
struts 1 校验http://www.aygfsteel.com/wansong/articles/332659.htmlw@ns0ngw@ns0ngWed, 22 Sep 2010 14:08:00 GMThttp://www.aygfsteel.com/wansong/articles/332659.htmlhttp://www.aygfsteel.com/wansong/comments/332659.htmlhttp://www.aygfsteel.com/wansong/articles/332659.html#Feedback0http://www.aygfsteel.com/wansong/comments/commentRss/332659.htmlhttp://www.aygfsteel.com/wansong/services/trackbacks/332659.html http://lucky16.javaeye.com/blog/450144
http://www.javaeye.com/topic/154151

如这L500错误QNo input attribute for mapping path.  Validator要求面做验?
解决办法一:
在struts_config.xml里的<action里加入input
解决办法?
把struts_config.xml里的<action里的validatorҎfalse



Struts作ؓ一个不停发展的开源项目,在页面校验这一块采用了Jakarta的Commons目的ValidateQ结合Struts的MVC体系Q?br /> 用v来确实不错。徏议校验这部分在完成jsp后加入?br /> 原理QStruts的页面校验分两种ҎQ一U是前台生成JavascriptQ一U是后台class?br />       而出错信息对应的也有两种昄ҎQ一U是弹出消息框,一U是在原面昄?br />       我个人比较喜Ƣ弹出消息框q种Q因为可以将焦点|到出错的field中?br />       所以我侧重介绍如何实现q种?br />       h下列步骤一步一步进行,q行的时候思考它的做法?br />      
1     Struts所需lib加入到项目lib路径或服务器的lib路径
      Struts1.1需要如下libQstruts-legacy.jar struts.jar jakarta-oro.jar commons-validator.jar
      commons-logging.jar commons-lang.jar commons-fileupload.jar commons-digester.jar commons-collections.jar
      commons-beanutils.jar(可以看到Struts1.1用了很多Commons目的东?
2     下载的Struts1.1的包中的webapps\struts-validator.war 中的validation.xml和validator-rules.xml
      拷到目的WEB-INF路径
      仔细研究一下这两个文gQ可以看到validator-rules.xml是提供一些常用的validation规则?br />       目前提供了requiredQrequiredif,minlength,maxlength,mask,byte,short,integer,long,float,
      double,date,range,intRange,floatRange,creditCard,email,
      我看了一下,只有mask不知道具体是q啥的,其他望文生义?至于如何DIY一条自qruleQ俺q不?
      重头戏来了,修改validation.xml。可以看一下validation.xmll构
validation.xmlQ?nbsp;    
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
          "

<form-validation>
   <global>
      <constant>
        <constant-name>phone</constant-name>
        <constant-value>^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$</constant-value>
      </constant>
      <constant>
        <constant-name>zip</constant-name>
        <constant-value>^\d{5}\d*$</constant-value>
      </constant>
   </global>
   <formset>
      <constant>
        <constant-name>zip</constant-name>
        <constant-value>^\d{5}(-\d{4})?$</constant-value>
      </constant>

      <form    name="registrationForm">
         <field    property="firstName"
             depends="required,mask,minlength">
               <arg0 key="registrationForm.firstname.displayname"/>
               <arg1 name="minlength" key="${var:minlength}" resource="false"/>
                     <var>
                       <var-name>mask</var-name>
                       <var-value>^\w+$</var-value>
                     </var>
                     <var>
                       <var-name>minlength</var-name>
                       <var-value>5</var-value>
                     </var>
         </field>
        ..........
      
      怿大家仔细一看就明白?首先Q可以定义一些用正则表达式表C的规则Q这些规则还分全局和局部?br />       q样可以DIY一些可以用正则表达式表C的规则了,例如下面具体用C自定义的规则:phone?br />       ...
   <global>
      <constant>
        <constant-name>phone</constant-name>
        <constant-value>^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$</constant-value>
      </constant>
   </global>
   ...  
      <field    property="mobile"
             depends="mask">
               <arg0 key="registrationForm.mobile.displayname"/>
                     <var>
                       <var-name>mask</var-name>
                       <var-value>${phone}</var-value>
                     </var>
      </field>
   ...
      q下也明白mask的作用了Q原来它是专门用于自定义规则Q?br />       然后可以添加需要加validation的field了,格式如下Q?br />       <formset>
      <form name="registrationForm">
         <field    property="firstName"
             depends="required,mask,minlength">
               <arg0 key="registrationForm.firstname.displayname"/>
               <arg1 name="minlength" key="${var:minlength}" resource="false"/>
                     <var>
                       <var-name>mask</var-name>
                       <var-value>^\w+$</var-value>
                     </var>
                     <var>
                       <var-name>minlength</var-name>
                       <var-value>5</var-value>
                     </var>
         </field>
      </form>
      </formset>
     
3     需要加validation的formbean全部Ҏ extends ValidatorForm
4     在struts-config.xml文g中加入一D代?lt;plug-in></plug-in>Q位|如下:
......
    <action name="performanceSearchForm" path="/performanceRptAction" scope="request" type="com.hp.elog2.action.report.PerformanceRptAction">
      <forward name="success" path="/FinalRpt.jsp" redirect="false" />
    </action>
  </action-mappings>
  <message-resources parameter="ApplicationResources" />
  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
  </plug-in>
</struts-config>

5     在ApplicationResources.properties文g中加入如下内?

# Errors
errors.header=Validation Error
errors.required={0} is required.
errors.minlength={0} can not be less than {1} characters.
errors.maxlength={0} can not be greater than {1} characters.
errors.invalid={0} is invalid.
errors.byte={0} must be an byte.
errors.short={0} must be an short.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.float={0} must be an float.
errors.double={0} must be an double.
errors.date={0} is not a date.
errors.range={0} is not in the range {1} through {2}.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
      
      且注意在修改validation.xmlӞ?br />        <arg0 key="registrationForm.firstname.displayname"/>
      则ApplicationResources.properties中要有对应的 registrationForm.firstname.displayname 倹{?br />       q就可以实现出错信息本地化?/p>

6     修改要加validation的jsp文g。两处:
        1 在页面的form标签中加入onsubmit事g
        <html:form action="registration" onsubmit="return validateRegistrationForm(this);">
        2 ?lt;/body>之前加入一D代码,内容如下Q?br />         <html:javascript formName="registrationForm"/>
        q段代码会自动生成上面的validateRegistrationForm(this)函数



w@ns0ng 2010-09-22 22:08 发表评论
]]>
Struts2 关于OGNL?#$的应?/title><link>http://www.aygfsteel.com/wansong/articles/326925.html</link><dc:creator>w@ns0ng</dc:creator><author>w@ns0ng</author><pubDate>Fri, 23 Jul 2010 04:32:00 GMT</pubDate><guid>http://www.aygfsteel.com/wansong/articles/326925.html</guid><wfw:comment>http://www.aygfsteel.com/wansong/comments/326925.html</wfw:comment><comments>http://www.aygfsteel.com/wansong/articles/326925.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wansong/comments/commentRss/326925.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wansong/services/trackbacks/326925.html</trackback:ping><description><![CDATA[http://hi.baidu.com/zhouhwbuaa/blog/item/b9b23bfbd478ab106c22eb0e.html<br /> <br /> http://wallboy.javaeye.com/blog/513096  <a >OGNL表达式语a介绍 </a><br /> <br /> <br /> 讉KOGNL上下文和Action上下文,#相当于ActionContext.getContext()Q下表有几个ActionContext中有用的属性:   名称 作用 例子 <br /> parameters 包含当前HTTPh参数的Map #parameters.id[0]作用相当于request.getParameter("id") <br /> request 包含当前HttpServletRequest的属性(attribute)的Map #request.userName相当于request.getAttribute("userName") <br /> session 包含当前HttpSession的属性(attributeQ的Map #session.userName相当于session.getAttribute("userName") <br /> application 包含当前应用的ServletContext的属性(attributeQ的Map #application.userName相当于application.getAttribute("userName") <br /> attr 用于按request > session > application序讉K其属性(attributeQ?#attr.userName相当于按序在以上三个范_scopeQ内duserName属性,直到扑ֈ为止 <br /> <br /> 用于qo和投影(projecting)集合Q如books.{?#this.price<100}Q?<br /> 构造MapQ如#{'foo1':'bar1', 'foo2':'bar2'}?<br /> <br /> “%”W号的用途是在标志的属性ؓ字符串类型时Q计OGNL表达式的倹{?br /> “$”有两个主要的用途,用于在国际化资源文g中,引用OGNL表达式。在Struts 2配置文g中,引用OGNL表达式?br /> <br /> <br /> <br /> Struts2中的OGNL表达式语a是对Xwork的OGNL的封装。我们要理解一下几点: <br /> 1Q?Struts2中将ActionContext作ؓOGNL的上下文环境QActionContext内部含有一个Map对象Q?<br /> 2Q?Struts2中的OGNL表达式语a的根对象是一个ValueStackQValueStack中的每一个对象都被视为根对象?<br /> Struts2框架实例化的Action对象攑օValueStack中,如果是Action链,则多个Action都存在于 ValueStack中。而ValueStack中除了Action外,Struts2框架q将 parametersQrequestQresponseQsessionQapplicationQattr{对象放到ValueStack中,讉Kq些对象需要加前缀#?<br /> <br /> ȝQStruts2中的数据处理ZXwork的OGNLQ它在OGNL的基上进行了一定的装。OGNL的核心概忉|根对?root)和上下文环境(context)---你可以传入一个Map对象作ؓ上下文,向其中putq一个对象,那么q个对象可以作ؓ根对象(ognl中可以向函数中传入不同的Map对象作ؓ根对象来操作Q也可以指定不同的根对象Q而Struts2中,它固定了根对象ValueStackQ。在Struts2 中,ActionContext作ؓOGNL的上下文环境Q它的根对象是一个ValueStackQValueStack中的每个对象都被视ؓ根对象?Struts2中的Action作ؓ根对象存?如果多个Action以chain的Ş式存在,则多个Action均存在于ValueStack中,均ؓ根对??<br /> <br /> <br /> <s:property value="user.name" /> <br /> <br /> <s:property value="%{#application.myApplicationAttribute}" /> <br /> <s:property value="%{#session.mySessionAttribute}" /> <br /> <s:property value="%{#request.myRequestAttribute}" /> <br /> <s:property value="%{#parameters.myParameter}" /> <br /> <br /> <br /> <br /> <img src ="http://www.aygfsteel.com/wansong/aggbug/326925.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wansong/" target="_blank">w@ns0ng</a> 2010-07-23 12:32 <a href="http://www.aygfsteel.com/wansong/articles/326925.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Struts tipshttp://www.aygfsteel.com/wansong/articles/326906.htmlw@ns0ngw@ns0ngFri, 23 Jul 2010 02:26:00 GMThttp://www.aygfsteel.com/wansong/articles/326906.htmlhttp://www.aygfsteel.com/wansong/comments/326906.htmlhttp://www.aygfsteel.com/wansong/articles/326906.html#Feedback0http://www.aygfsteel.com/wansong/comments/commentRss/326906.htmlhttp://www.aygfsteel.com/wansong/services/trackbacks/326906.html http://book.csdn.net/bookfiles/479/10047916715.shtml   Struts 2的基本配|?nbsp;

<
action name ="Login" class ="tutorial.Login" >
           
< result type ="chain" > AuthorizatedAccess </ result >
       
</ action >
       
< action name ="AuthorizatedAccess" class ="tutorial.AuthorizatedAccess" >
           
< interceptor-ref name ="auth" />
           
< result name ="login" > /Login.jsp </ result >
           
< result name ="success" > /ShowRole.jsp </ result >
       
</ action >


In struts2-showcase project:
<default-action-ref name="showcase" />
<action name="showcase">
            <result>showcase.jsp</result>
        </action>

In struts-default.xml of struts-core:
<default-interceptor-ref name="defaultStack"/>
<default-class-ref class="com.opensymphony.xwork2.ActionSupport" />


w@ns0ng 2010-07-23 10:26 发表评论
]]>
Struts2 程 架构?/title><link>http://www.aygfsteel.com/wansong/articles/325953.html</link><dc:creator>w@ns0ng</dc:creator><author>w@ns0ng</author><pubDate>Tue, 13 Jul 2010 06:30:00 GMT</pubDate><guid>http://www.aygfsteel.com/wansong/articles/325953.html</guid><wfw:comment>http://www.aygfsteel.com/wansong/comments/325953.html</wfw:comment><comments>http://www.aygfsteel.com/wansong/articles/325953.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wansong/comments/commentRss/325953.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wansong/services/trackbacks/325953.html</trackback:ping><description><![CDATA[http://secyaher.blog.163.com/blog/static/38955772009610113458949/ <img src ="http://www.aygfsteel.com/wansong/aggbug/325953.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wansong/" target="_blank">w@ns0ng</a> 2010-07-13 14:30 <a href="http://www.aygfsteel.com/wansong/articles/325953.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">Ӧñر</a>| <a href="http://" target="_blank">Դ</a>| <a href="http://" target="_blank">¹</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">̨</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ָɽ</a>| <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ڻ</a>| <a href="http://" target="_blank">ԭ</a>| <a href="http://" target="_blank">ɽʡ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͭϿ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɰ</a>| <a href="http://" target="_blank">ǧ</a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Դ</a>| <a href="http://" target="_blank">Դ</a>| <a href="http://" target="_blank">̨</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ӽ</a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Դ</a>| <a href="http://" target="_blank">׿</a>| <a href="http://" target="_blank">ƽ˳</a>| <a href="http://" target="_blank">ʲ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>