Joe Degiovanni
Joe Degiovanni

Reputation: 205

How to use MDS customization to add JSTL functions tag library?

I added the JSTL functions tag library into the folderViewer.jsff view in the WebCenter Portal 11.1.1.6.0 folderViewer taskflow (oracle.webcenter.doclib.view.jsf.taskflows.folderViewer), so that I can perform string operations prior to rendering the view.

I added it using the following mds:modify block in the folderViewer.jsff.xml MDS customization file:

<mds:modify element="(xmlns(jsp=http://java.sun.com/JSP/Page))/jsp:root">
  <mds:attribute name="version" value="2.1"/>
  <mds:attribute name="xmlns:fn" value="http://java.sun.com/jsp/jstl/functions"/>
</mds:modify>

This allows me to use the JSTL functions in EL statements, such as: startFolderPath=#{fn:replace(fn:substringAfter(item.url,'path'),'%20','%2520')}.

However, there seems to be an unintended side-effect of this in the folderViewer task flow. When there are over 50 subfolders in a folder, scrolling past the 50th subfolder and trying to navigate to one of the subfolders (i.e. navigating to subfolder #51) results in a WebCenter error page being displayed and the following error in the logs:

<Oct 28, 2013 3:10:54 PM CDT> <Error>     <oracle.webcenter.webcenterapp.internal.view.webapp> <BEA-000000> <
oracle.mds.exception.MDSRuntimeException: invalid namespace http://java.sun.com/JSP/Page for prefix xmlns
invalid namespace http://java.sun.com/JSP/Page for prefix xmlns
    at oracle.mds.core.MOTxnState.getDocument(MOTxnState.java:266)
    at oracle.mds.core.UpdateableMOContent.getDocument(UpdateableMOContent.java:561)
    at oracle.mds.core.MetadataObject.getDocument(MetadataObject.java:449)
    at oracle.mds.core.MetadataObject.getDocument(MetadataObject.java:396)
...
    at     weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
>
<Oct 28, 2013 3:10:54 PM CDT> <Error> <oracle.webcenter.webcenterapp> <BEA-000000>      <Internal Error (WCS#2013.10.28.15.10.54)>

If I remove the MDS customization to folderViewer.jsff.xml that adds the JSTL Functions tag library, this issue does not exist.

Does anyone know of a different way to add a new tag library via MDS customization?

Thanks, Joe

Upvotes: 1

Views: 1014

Answers (1)

Amr Gawish
Amr Gawish

Reputation: 2025

It seems like its trying to give prefix xmlns instead of JSP

I'm just wonder if you changed the above code to the following, what will happen

<mds:modify element="jsp:root">
  <mds:attribute name="version" value="2.1"/>
  <mds:attribute name="xmlns:jsp" value="http://java.sun.com/JSP/Page"/>
  <mds:attribute name="xmlns:fn" value="http://java.sun.com/jsp/jstl/functions"/>
</mds:modify>

Upvotes: 0

Related Questions