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

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

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

    posts - 84, comments - 54, trackbacks - 0, articles - 0
       :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    在JSP中有這樣一行代碼:

    <td class="FormContents">
    <fmt:formatDate value="${usr.userCreDate}" pattern="dd-MMM-yyyy" />
    </td>

    在WebSphere Portal6中運行時報錯:
    Nested Exception is com.ibm.ws.jsp.JspCoreException: Unable to convert string '${usr.userCreDate}' to class java.util.Date for attribute value: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
             at org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:
    930)
             at com.ibm._jsp._userEnquiry._jspx_meth_fmt_formatDate_0(_userEnquiry.java:
    1624)
             at com.ibm._jsp._userEnquiry._jspService(_userEnquiry.java:
    643)
             at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:
    91)
             at javax.servlet.http.HttpServlet.service(HttpServlet.java:
    856)

     

    而該JSP在Portal 5中確定是沒問題的。利用Google找到一個類似的問題,有人做了如下 的解答:

    1) Declare web.xml as Servlet 2.5.
    2) Remove all loose JSTL tld files from your classpath. Those are already included in the JSTL JAR file.
    3) Remove the TLD declarations from your web.xml. Those are already declared in the JSTL JAR's web.xml.
    4) I recommend to remove the JSTL and Standard JAR's and use JSTL 1.2 instead: jstl-1.2.jar. Just place it in the classpath (YourWebApp/WEB-INF/lib or Tomcat/lib) and declare the @taglib in your JSP to use it. Nothing more, nothing less. Do not extract the JAR and duplicate the stuff everywhere.

    再三檢查后,以上4點在移植過程中都已經注意了,除了Servlet是2.4以外,但是應該和這個沒關系。

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4"
        xmlns
    ="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi
    ="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation
    ="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    </web-app>

     

    既然原因不在這里,就只有另外想辦法,根據錯誤信息,忽然想到盡管WEB-INF/lib中的jstl.jar沒問題,但是是否加載到了這個jar呢。打開EAR項目下的application.xml,轉到Deployment,將Classloader Mode設置為PARENT_LAST。重啟發布項目后,問題解決。
    該設置的物理位置在{EAR}\META-INF\ibmconfig\cells\defaultCell\applications\defaultApp\deployments\defaultApp\deployment.xml中

    <?xml version="1.0" encoding="UTF-8"?>
    <appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1236654129452">
      
    <deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1236654129452" startingWeight="10">
        
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1236654129452" startingWeight="10000" uri="MyPortal_Web.war"/>
        
    <classloader xmi:id="Classloader_1236654129452" mode="PARENT_LAST"/>
      
    </deployedObject>
    </appdeployment:Deployment>

    評論

    # re: 從Websphere Portal5移植Web應用到Websphere Portal6時fmt:formatDate報錯的解決  回復  更多評論   

    2009-03-16 14:05 by Amber
    謝謝啦 我正好遇到這個問題 都暈了
    主站蜘蛛池模板: 亚洲色无码专区在线观看| 日韩视频免费在线| 亚洲AV无码国产精品麻豆天美 | 亚洲国产精品yw在线观看| 日韩av无码久久精品免费| 亚洲伦另类中文字幕| 99热在线免费观看| 97久久精品亚洲中文字幕无码| 亚洲视频免费在线观看| 91亚洲va在线天线va天堂va国产| 日本免费大黄在线观看| 亚洲小说图片视频| 久久久久久国产精品免费免费 | 久久久久久亚洲精品| 精品视频一区二区三区免费| 黑人精品videos亚洲人| 日韩内射激情视频在线播放免费 | 亚洲免费视频网站| 91九色老熟女免费资源站| 国产日本亚洲一区二区三区| 美女黄网站人色视频免费国产 | 亚洲最大av资源站无码av网址| 成人毛片免费网站| 国产亚洲视频在线观看| 久久久久亚洲AV综合波多野结衣 | 午夜毛片不卡高清免费| 色多多免费视频观看区一区| 亚洲伊人久久精品影院| 久久国产高潮流白浆免费观看| 精品亚洲AV无码一区二区| 免费在线观看视频a| 18禁在线无遮挡免费观看网站| 亚洲天天在线日亚洲洲精| 无码中文字幕av免费放| 免费的黄网站男人的天堂| 亚洲AV无码专区亚洲AV伊甸园| 久久不见久久见中文字幕免费| 精品免费久久久久国产一区| 久久精品国产亚洲av麻豆图片| 亚洲AV无码一区二三区| 在线免费观看国产|