<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-2  評(píng)論-0  文章-17  trackbacks-0

    Weblogic 10下JSP el與ognl的問題與解決方法

    admin發(fā)布于2010-05-06 10:17 | 142次閱讀

    English Title:Weblogic 10 leaves the problem of JSP El and Ognl and means of settlement
    在使用Webwork或Struts2標(biāo)簽寫JSP時(shí),經(jīng)常會(huì)用到如下寫法: <ww:radio name="gender" list='#{"1":"Male", "2":"FeMale"}' /> <ww:select name="yes" list='#{"1":"YES","2":"NO"}' /> 這是ognl的寫法,list里的表達(dá)式將解釋成成一個(gè)Map,實(shí)際上是一個(gè)LinkedHashMap。 ? 這種寫法在Tomat下部署是沒有任何問題的,但部署到Weblogic 10下問題就來了,這里web.xml的version聲明為2.4,編譯JSP時(shí)報(bào)表達(dá)式錯(cuò)誤。如果聲明為2.3是不會(huì)報(bào)錯(cuò)的,因?yàn)閟ervlet 2.3(即jsp 1.2)是不支持EL的,使用Weblogic 9同樣也不會(huì)報(bào)錯(cuò)。據(jù)此可以推測(cè)原因?yàn)榫幾gJSP時(shí)Weblogic? JSP編譯器將OGNL的表達(dá)式誤認(rèn)為是EL表達(dá)式。 ? ?解決辦法: 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為2.3。 ?3、因?yàn)榇罅宽撁嬗玫紼L,如${someValue},所以1和2基本行不通的,所以從OGNL的表達(dá)式入手,最終寫成 list='#@java.util.LinkedHashMap@{"1":"Male","2":"FeMale"}'?, 顯式指定使用LinkedHashMap來構(gòu)建Map。問題解決。
    ==========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
    posted on 2010-08-09 10:32 lameer 閱讀(783) 評(píng)論(0)  編輯  收藏 所屬分類: struts2學(xué)習(xí)
    主站蜘蛛池模板: 国产在线a免费观看| 你懂的免费在线观看网站| 一个人免费观看视频www | 亚洲综合色区在线观看| 无码一区二区三区亚洲人妻| 国产91在线免费| 欧洲精品码一区二区三区免费看| 亚洲性日韩精品国产一区二区| 国产精品1024在线永久免费 | 国产免费久久精品久久久| 亚洲AV无码一区二区大桥未久| 日本成人免费在线| 成年免费大片黄在线观看com| 亚洲综合色成在线播放| 一级毛片在线免费看| 亚洲最大在线观看| 永久免费毛片手机版在线看| 曰批全过程免费视频观看免费软件 | 16女性下面无遮挡免费| 性xxxx黑人与亚洲| 亚洲A∨午夜成人片精品网站| 亚洲免费日韩无码系列| 亚洲AV人人澡人人爽人人夜夜| 亚洲一区二区免费视频| 自拍偷自拍亚洲精品播放| 亚洲精品视频久久久| 国产成人久久AV免费| 亚洲人成电影网站免费| 亚洲精品和日本精品| 免费看黄的成人APP| 亚洲AV无码国产精品色| 亚洲AV无码乱码在线观看牲色| 今天免费中文字幕视频| 精品亚洲成在人线AV无码| 伊人久久亚洲综合影院| 久久久久久久99精品免费| 亚洲乱亚洲乱妇24p| 国产亚洲精品va在线| 成人看的午夜免费毛片| 成人自慰女黄网站免费大全| 中文字幕亚洲男人的天堂网络|