??xml version="1.0" encoding="utf-8" standalone="yes"?>奇米影视888狠狠狠777不卡,亚洲视屏一区,亚洲成人中文字幕http://www.aygfsteel.com/lameer/category/42610.htmlShare your knowledge with the world!zh-cnSun, 29 May 2011 14:33:43 GMTSun, 29 May 2011 14:33:43 GMT60struts2 变慢的处理办?http://www.aygfsteel.com/lameer/articles/347378.htmllameerlameerThu, 31 Mar 2011 05:15:00 GMThttp://www.aygfsteel.com/lameer/articles/347378.htmlhttp://www.aygfsteel.com/lameer/comments/347378.htmlhttp://www.aygfsteel.com/lameer/articles/347378.html#Feedback0http://www.aygfsteel.com/lameer/comments/commentRss/347378.htmlhttp://www.aygfsteel.com/lameer/services/trackbacks/347378.html 1. 攑ּ默认的dojo方式处理AJAXQ改用jQuery
2. 减少使用Ognl表达式,最好用FreeMaker代替JSP
3. 关闭logging和devMode
4. Struts.xml中删除不需要的拦截?



lameer 2011-03-31 13:15 发表评论
]]>
Weblogic 10下JSP el与ognl的问题与解决Ҏhttp://www.aygfsteel.com/lameer/articles/328288.htmllameerlameerMon, 09 Aug 2010 02:32:00 GMThttp://www.aygfsteel.com/lameer/articles/328288.htmlhttp://www.aygfsteel.com/lameer/comments/328288.htmlhttp://www.aygfsteel.com/lameer/articles/328288.html#Feedback0http://www.aygfsteel.com/lameer/comments/commentRss/328288.htmlhttp://www.aygfsteel.com/lameer/services/trackbacks/328288.html

Weblogic 10下JSP el与ognl的问题与解决Ҏ

admin发布?010-05-06 10:17 | 142ơ阅?/font>

English Title:Weblogic 10 leaves the problem of JSP El and Ognl and means of settlement
在用Webwork或Struts2标签写JSPӞl常会用到如下写法: <ww:radio name="gender" list='#{"1":"Male", "2":"FeMale"}' /> <ww:select name="yes" list='#{"1":"YES","2":"NO"}' /> q是ognl的写法,list里的表达式将解释成成一个MapQ实际上是一个LinkedHashMap?? q种写法在Tomat下部|是没有M问题的,但部|到Weblogic 10下问题就来了Q这里web.xml的version声明?.4Q编译JSP时报表达式错误。如果声明ؓ2.3是不会报错的Q因为servlet 2.3(即jsp 1.2)是不支持EL的,使用Weblogic 9同样也不会报错。据此可以推原因ؓ~译JSP时Weblogic? JSP~译器将OGNL的表辑ּ误认为是EL表达式?? ?解决办法Q?1、禁用EL。在web.xml上加?<jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <el-ignored>true</el-ignored> </jsp-property-group> </jsp-config> ?2、更改web.xml的version?.3??3、因为大量页面用到ELQ如${someValue}Q所??基本行不通的Q所以从OGNL的表辑ּ入手Q最l写?list='#@java.util.LinkedHashMap@{"1":"Male","2":"FeMale"}'?, 昑ּ指定使用LinkedHashMap来构建Map。问题解冟?br /> ==========English==========
When use Webwork or Struts2 label write JSP, classics regular meeting uses a method: <ww:rAdio Name="gender" List='#{"1" :" Male" , "2" :" FeMale"}' /><ww:sElect Name="yes" List='#{"1" :" YES" , "2" :" NO"}' />This is Ognl write a law, the expression in List becomes the explanation a Map, it is a LinkedHashMap actually. ? This kind writes a law to issue deploy in Tomat do not have any problems, but deploy came to the problem below Weblogic 10, the Version statement of Web.xml is here 2.4, compile mistake of JSP times expression. If statement is 2.3 be to won't sign up for a fault, because of Servlet 2.3(namely Jsp 1.2) does not support EL, use Weblogic 9 also won't sign up for a fault likewise. Can you figure the reason is the Weblogic when compiling JSP accordingly? JSP is compiled implement consider as the expression of OGNL EL expression by accident. ? ? Settle way: 1, ban with EL. <jsp-config is added on Web.xml><jsp-property-group><url-pattern>*.jsp</url-pattern><el-ignored>true</el-ignored></jsp-property-group></jsp-config>? 2, the Version that changes Web.xml is 2.3. ? 3, use EL because of a large number of pages, be like ${someValue} , so 1 and 2 won't do basically, so the expression proceed with from OGNL, write finally into List='#@java.util.LinkedHashMap@{"1" :" Male" , "2" :" FeMale"}' ? , explicit appoint use LinkedHashMap to come compose builds Map. Ask the problem is solved.

http://www.pjprimer.com/view-24083-1.html


lameer 2010-08-09 10:32 发表评论
]]>
如何让Struts2中datetimepicker 标签的输入框不可输入http://www.aygfsteel.com/lameer/articles/315048.htmllameerlameerWed, 10 Mar 2010 06:06:00 GMThttp://www.aygfsteel.com/lameer/articles/315048.htmlhttp://www.aygfsteel.com/lameer/comments/315048.htmlhttp://www.aygfsteel.com/lameer/articles/315048.html#Feedback0http://www.aygfsteel.com/lameer/comments/commentRss/315048.htmlhttp://www.aygfsteel.com/lameer/services/trackbacks/315048.html阅读全文

lameer 2010-03-10 14:06 发表评论
]]>
struts2中iterator标签的相关??http://www.aygfsteel.com/lameer/articles/301232.htmllameerlameerThu, 05 Nov 2009 03:00:00 GMThttp://www.aygfsteel.com/lameer/articles/301232.htmlhttp://www.aygfsteel.com/lameer/comments/301232.htmlhttp://www.aygfsteel.com/lameer/articles/301232.html#Feedback0http://www.aygfsteel.com/lameer/comments/commentRss/301232.htmlhttp://www.aygfsteel.com/lameer/services/trackbacks/301232.html在说明s:iterator标签的用前Q先了解下struts2中的Value Stack。这里参考了webwork中对Value Stack的描qͼ׃struts2是在webwork的基上进行升U的Q因此webwork对于Value Stack的表q同样适用于struts2。在q里不描qValue Stack具体做什么,但有两点需要注意:

1.一个value stack本质上是一个List;
2.在栈中调用[n]返回一个从位置n开始的子栈;
 

对于2举个例子说明。假定Value Stack包含了[model,action,others]Q那?/p>

[0] --- q回 [model,action,others]Q?
[1] --- q回 [action,others]Q?
[2] --- q回 [others];
现在开始介ls:iterator的一些用。以下代码片D均在开发环境eclipse3.4 wtp、tomcat5.5、jdk5上用struts2.1.6试通过?/p>

1) 、访?days

defined  List<String>  days   ["Monday","Thursday","Friday","Sunday"]

view plaincopy to clipboardprint?
<s:iterator value="days"><s:property /></s:iterator> 
<s:iterator value="days"><s:property /></s:iterator>

2) 、?top 关键字?qo掉Monday)

defined  List<String>  days   ["Monday","Thursday","Friday","Sunday"]

view plaincopy to clipboardprint?
    <s:iterator value="days"> 
            <s:if test="top!='Monday'"> 
                <s:property /> 
            </s:if>  
    </s:iterator>  
    <s:iterator value="days">
            <s:if test="top!='Monday'">
                <s:property />
            </s:if>
     </s:iterator>

top 指代当前q代元素Q可以ؓ对象Q?
q里的top可用[0].top替代Q但不能使用[0]。[0]代表整个栈对象。如果单U调用[0]会调用其toString()Ҏ输出对象信息Q?/p>

3)、?last / first 关键字?/strong>

defined  String[][] aTs = { { "一", "?, "?, "? },{ "一一", "二二", "三三", "四四"} };

view plaincopy to clipboardprint?
<!--遍历二维数组QThe trick here is to use 'top' as the value for the inner iterator-->  
        <s:iterator value="aTs" status="of">  
            <s:if test="#of.last"><br/></s:if>  
            <s:iterator value="top">  
            <!--亦可用[0].top替代。如果单U用[0],则会同时打印该处栈对象信?->  
                 <s:property />  
            </s:iterator>  
        </s:iterator> 
<!--遍历二维数组QThe trick here is to use 'top' as the value for the inner iterator-->
       <s:iterator value="aTs" status="of">
           <s:if test="#of.last"><br/></s:if>
           <s:iterator value="top">
           <!--亦可用[0].top替代。如果单U用[0],则会同时打印该处栈对象信?->
           <s:property />
           </s:iterator>
       </s:iterator>  
iterator 标签中的status属性代表当前P代的位置Q?
#of.last用于判断当前是否跌到的最后一个元素;
lastq回一个booleancd;
first q回一个booleancd;

4)、?odd / even 关键?/strong>

下面的例子要实现每行输出颜色不同的效果?/p>

defined  List<String>  days   ["Monday","Thursday","Friday","Sunday"]

view plaincopy to clipboardprint?
       <!--奇数行显CZؓU色,偶数行显CZؓl色--> 
       <s:iterator value="days" status="offset">  
           <s:else>  
                <s:if test="#offset.odd==true">  
                    <li style="color: red" mce_style="color: red"><s:property /></li>  
                </s:if>  
                <s:else>  
                    <li><s:property /></li>  
                </s:else>  
            </s:else>  
        </s:iterator> 
        <!--奇数行显CZؓU色,偶数行显CZؓl色-->
        <s:iterator value="days" status="offset">
            <s:else>
               <s:if test="#offset.odd==true">
                   <li style="color: red" mce_style="color: red"><s:property /></li>
               </s:if>
               <s:else>
                   <li><s:property /></li>
               </s:else>
           </s:else>
         </s:iterator>

odd关键字用来判断当前P代位|是否ؓ奇数行。oddq回booleancd;
evne关键字用来判断当前P代位|是否ؓ偶数行。evenq回booleancd

5)、ȝ下,当声明iterator的status属性时Q通过#statusName.method 可以使用以下Ҏ:

even : boolean - 如果当前q代位置是偶数返回true
odd : boolean - 如果当前q代位置是奇数返回true
count : int - q回当前q代位置的计??开?
index : int - q回当前q代位置的编??开?
first : boolean - 如果当前q代位置是第一位时q回true
last : boolean - 如果当前q代位置是最后一位时q回true
modulus(operand : int) : int - q回当前计数(?开?与指定操作数的模?

6)、最后再来看下在iterator中调用value stack的用法?/strong>

假定countries是一个List对象Q每一个country有一个name属性和一个citys List对象Qƈ且每一个city也有一个name属?。那么我们想要在q代cities是访问countries的name属性就的用如下方式Q?/p>


view plaincopy to clipboardprint?
<s:iterator value="countries"> 
    <s:iterator value="cities"> 
        <s:property value="name"/>, <s:property value="[1].name"/><br> 
    </s:iterator> 
</s:iterator> 
           <s:iterator value="countries">
               <s:iterator value="cities">
                   <s:property value="name"/>, <s:property value="[1].name"/><br>
               </s:iterator>
           </s:iterator>

q里?<ww:property value="name"/>取的是ctiy.name;<ww:property value="[1].name"/>取得是country.name
<ww:property value="[1].name"/> {h?<ww:property value="[1].top.name"/>
we refer to a specific position on the stack: '[1]'. The top of the stack, position 0, contains the current city, pushed on by the inner iterator; position 1 contains the current country, pushed there by the outer iterator.(city处于当前栈,即top或者[0],而[1]指明了外层iterator对象Q即country)
 '[n]'标记引用开始位|ؓn的子栈(sub-stackQ,而不仅仅是位|n处的对象。因?[0]'代表整个栈,?[1]'是除top对象外所有的栈元素?


转蝲出处Qhttp://blog.csdn.net/oxcow/archive/2009/09/03/4516283.aspx



lameer 2009-11-05 11:00 发表评论
]]>
JSP代码D中直接讉K值valuestack栈内??http://www.aygfsteel.com/lameer/articles/296148.htmllameerlameerWed, 23 Sep 2009 05:13:00 GMThttp://www.aygfsteel.com/lameer/articles/296148.htmlhttp://www.aygfsteel.com/lameer/comments/296148.htmlhttp://www.aygfsteel.com/lameer/articles/296148.html#Feedback0http://www.aygfsteel.com/lameer/comments/commentRss/296148.htmlhttp://www.aygfsteel.com/lameer/services/trackbacks/296148.html有些Ҏ情下:
        需要在JSP?lt;%%>java代码D中直接讉K值栈内容,而不使用<s:property value="name"/>获取Q?br /> 可以通过如下方式q行:

String name = (String)ActionContext.getContext().getValueStack().findValue( "name" ); 


        Z正常q行Q还需要在jsp这com.opensymphony.xwork.ActionContext cd?/p>

 <%@ page import= "com.opensymphony.xwork.ActionContext"  %> 


lameer 2009-09-23 13:13 发表评论
]]>
在javascript中读取struts2 s:datetimepicker中的??http://www.aygfsteel.com/lameer/articles/289704.htmllameerlameerTue, 04 Aug 2009 00:56:00 GMThttp://www.aygfsteel.com/lameer/articles/289704.htmlhttp://www.aygfsteel.com/lameer/comments/289704.htmlhttp://www.aygfsteel.com/lameer/articles/289704.html#Feedback0http://www.aygfsteel.com/lameer/comments/commentRss/289704.htmlhttp://www.aygfsteel.com/lameer/services/trackbacks/289704.html<s:datetimepicker id="time1" name="time1" toggleType="explode" value="today" /> 
<s:datetimepicker id="time2" name="time2" toggleType="explode" value="today" />

我们在javascript中可以通过以下方式d和赋?/p>

var time1= dojo.widget.byId("time1");
var stringtime1 = time1.getValue();//d
var time2= dojo.widget.byId("time2");
time2.setValue(stringtime1 ); 
//赋?/span>

以上代码Q取出time1中的|赋给time2


Struts2 API中的一个例?
Examples:
<s:datetimepicker name="order.date" label="Order Date" />
<s:datetimepicker name="delivery.date" label="Delivery Date" displayFormat="yyyy-MM-dd"  />
<s:datetimepicker name="delivery.date" label="Delivery Date" value="%{date}"  />
<s:datetimepicker name="delivery.date" label="Delivery Date" value="%{'2007-01-01'}"  />
<s:datetimepicker name="order.date" label="Order Date" value="%{'today'}"/>

Getting and getting the datetimepicker value, from JavaScript:

<s:datetimepicker id="picker" label="Order Date" />
<script type="text/javascript">
  
function setValue() {
     
var picker = dojo.widget.byId("picker");
     
     
//string value
     picker.setValue('2007-01-01');
     
     
//Date value
     picker.setValue(new Date());
  }

  
  
function showValue() {
     
var picker = dojo.widget.byId("picker");
     
     
//string value
     var stringValue = picker.getValue();
     alert(stringValue);
     
     
//date value
     var dateValue = picker.getDate();
     alert(dateValue);
  }

</script>


Publish topic when value changes:

<s:datetimepicker id="picker" label="Order Date" valueNotifyTopics="/value"/>
<script type="text/javascript">
dojo.event.topic.subscribe(
"/value"function(textEntered, date, widget){
    alert('value changed');
    
//textEntered: String enetered in the textbox
    //date: JavaScript Date object with the value selected
    //widet: widget that published the topic 
}
);
</script>

 



lameer 2009-08-04 08:56 发表评论
]]>
վ֩ģ壺 ̨| | üɽ| ľ| | | | | տ| | | | ľ| ˮ| | | Ǹ| | Ͼ| Թ| ɽ| ֣| | ɽ| | | ѧ| ɽ| | ԭ| | ʯ| Դ| ӳ| Ӫɽ| ߮| ̨| | | | |