從Websphere Portal5移植Web應(yīng)用到Websphere Portal6時(shí)fmt:formatDate報(bào)錯(cuò)的解決
Posted on 2009-03-10 12:14 馬達(dá)+斯加 閱讀(766) 評(píng)論(1) 編輯 收藏 所屬分類(lèi): Websphere Portal在JSP中有這樣一行代碼:



在WebSphere Portal6中運(yùn)行時(shí)報(bào)錯(cuò):






而該JSP在Portal 5中確定是沒(méi)問(wèn)題的。利用Google找到一個(gè)類(lèi)似的問(wèn)題,有人做了如下 的解答:
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點(diǎn)在移植過(guò)程中都已經(jīng)注意了,除了Servlet是2.4以外,但是應(yīng)該和這個(gè)沒(méi)關(guān)系。






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






