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

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

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

    隨筆-2  評論-0  文章-17  trackbacks-0

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

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

    English Title:Weblogic 10 leaves the problem of JSP El and Ognl and means of settlement
    在使用Webwork或Struts2標簽寫JSP時,經常會用到如下寫法: <ww:radio name="gender" list='#{"1":"Male", "2":"FeMale"}' /> <ww:select name="yes" list='#{"1":"YES","2":"NO"}' /> 這是ognl的寫法,list里的表達式將解釋成成一個Map,實際上是一個LinkedHashMap。 ? 這種寫法在Tomat下部署是沒有任何問題的,但部署到Weblogic 10下問題就來了,這里web.xml的version聲明為2.4,編譯JSP時報表達式錯誤。如果聲明為2.3是不會報錯的,因為servlet 2.3(即jsp 1.2)是不支持EL的,使用Weblogic 9同樣也不會報錯。據此可以推測原因為編譯JSP時Weblogic? JSP編譯器將OGNL的表達式誤認為是EL表達式。 ? ?解決辦法: 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、因為大量頁面用到EL,如${someValue},所以1和2基本行不通的,所以從OGNL的表達式入手,最終寫成 list='#@java.util.LinkedHashMap@{"1":"Male","2":"FeMale"}'?, 顯式指定使用LinkedHashMap來構建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) 評論(0)  編輯  收藏 所屬分類: struts2學習
    主站蜘蛛池模板: 永久黄网站色视频免费观看| 男女交性永久免费视频播放| 免费中文字幕在线观看| 区三区激情福利综合中文字幕在线一区亚洲视频1 | 亚洲人成色77777| 久久狠狠高潮亚洲精品| 亚洲人成色4444在线观看| 精品国产免费一区二区三区| 久久WWW免费人成人片| 亚洲永久精品ww47| 久久WWW免费人成—看片| 亚洲色成人中文字幕网站| 久久免费视频一区| 亚洲国产精品无码成人片久久| 亚洲久热无码av中文字幕| 免费无码又爽又刺激毛片| 最新亚洲人成网站在线观看| www视频在线观看免费| 中文字幕一精品亚洲无线一区| 亚洲色偷偷色噜噜狠狠99网| 无码人妻丰满熟妇区免费| 亚洲色一色噜一噜噜噜| XXX2高清在线观看免费视频| 亚洲爆乳无码一区二区三区| 亚洲综合成人婷婷五月网址| 69影院毛片免费观看视频在线 | 午夜老司机免费视频| 亚洲综合亚洲国产尤物| 99在线免费视频| 亚洲情a成黄在线观看| 亚洲成在人线aⅴ免费毛片| 日韩欧毛片免费视频| 亚洲精选在线观看| 97无码人妻福利免费公开在线视频| 亚洲国产精品嫩草影院久久 | 成全视频免费观看在线看| 久久久久亚洲av无码专区| 巨胸喷奶水视频www网免费| 一级看片免费视频囗交| 国产免费人成在线视频| 亚洲AV第一成肉网|