过滤的 xform 资源有问题 - javascript、css 和图像。我们尝试使用 OrbeonPortletXFormsFilter 和 Trampoline servlet 写入响应整个表单或使用 request.setAttribute(“oxf.xforms.renderer.document”, xformXml) 在 liferay portlet 中显示 xform。结果是一样的 - 呈现了表单,但没有找到 javascript 和 CSS,所有表单都分散了。表单操作也不起作用。谢谢你。
我的配置:
portlet.xml
<portlet>
<portlet-name>xForm-portlet</portlet-name>
<portlet-class>com.xform.XFormPortlet</portlet-class>
<init-param>
<name>oxf.main-processor.name</name>
<value>{http://www.orbeon.com/oxf/processors}pipeline</value>
</init-param>
<init-param>
<name>oxf.main-processor.input.config</name>
<value>oxf:/config/prologue-portlet.xpl</value>
</init-param>
<init-param>
<name>oxf.error-processor.name</name>
<value>{http://www.orbeon.com/oxf/processors}pipeline</value>
</init-param>
<init-param>
<name>oxf.error-processor.input.config</name>
<value>oxf:/config/error.xpl</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<portlet-info>
<title>Xform Portlet</title>
</portlet-info>
</portlet>
<filter>
<filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
<filter-class>org.orbeon.oxf.portlet.OrbeonPortletXFormsFilter</filter-class>
<lifecycle>RENDER_PHASE</lifecycle>
<lifecycle>ACTION_PHASE</lifecycle>
<lifecycle>RESOURCE_PHASE</lifecycle>
<init-param>
<name>oxf.xforms.renderer.context</name>
<value>/orbeon</value>
</init-param>
</filter>
<!-- Map the Orbeon portlet XForms filter -->
<filter-mapping>
<filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
<portlet-name>xForm-portlet</portlet-name>
</filter-mapping>
web.xml
<filter>
<filter-name>orbeon-xforms-filter</filter-name>
<filter-class>org.orbeon.oxf.servlet.OrbeonXFormsFilter</filter-class>
<init-param>
<param-name>oxf.xforms.renderer.context</param-name>
<param-value>/orbeon</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>orbeon-xforms-filter</filter-name>
<url-pattern>/orbeon/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>orbeon-trampoline-servlet</servlet-name>
<servlet-class>org.orbeon.oxf.portlet.OrbeonTrampolineServlet</servlet-class>
<init-param>
<param-name>oxf.xforms.renderer.context</param-name>
<param-value>/orbeon</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>orbeon-trampoline-servlet</servlet-name>
<url-pattern>/xforms-trampoline</url-pattern>
</servlet-mapping>