Can't view/open a PDF
dardan Nov 5, 2010 5:07 PMAll,
Does the JBoss Portlet Bridge 2.0.0.Final support Seam's PDF generating capabilities?
Outside the JBoss EPP 4.3 environment, I am able to generate the pdf file. However, in the context of the portlet, after I click the s:link, nothing is shown.
Thanks in advance,
-DT
Part of web.xml
<servlet> <servlet-name>Document Store Servlet</servlet-name> <servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class> <servlet> <servlet-name>Document Store Servlet</servlet-name> <servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Document Store Servlet</servlet-name> <url-pattern>*.pdf</url-pattern> </servlet-mapping> </servlet> <servlet-mapping <servlet-name>Document Store Servlet</servlet-name> <url-pattern>*.pdf</url-patt </servlet-mapping>
Part of componenets.xml
<?xml version="1.0" encoding="UTF-8"?> <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:pdf="http://jboss.com/products/seam/pdf" xmlns:document="http://jboss.com/products/seam/document" xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:transaction="http://jboss.com/products/seam/transaction" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mail="http://jboss.com/products/seam/mail" xsi:schemaLocation=" http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.2.xsd http://jboss.com/products/seam/document http://jboss.com/products/seam/document-2.2.xsd "> <core:init jndi-pattern="Contract2/#{ejbName}/local" debug="true"/> <persistence:managed-persistence-context name="em" auto-create="true" persistence-unit-jndi-name="java:/housingEntityManagerFactory"/> <component name="org.jboss.seam.document.documentStore"> <property name="useExtensions">true</property> <!-- <property name="errorPage">/facelets/pdf/documentMissing.xhtml</property> --> </component> <core:manager conversation-timeout="120000" concurrent-request-timeout="500" conversation-id-parameter="cid"/> </components>
confirmationAndPaymentInstruction.xhtml
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:c="http://java.sun.com/jstl/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" template="/facelets/templates/template.xhtml"> <ui:define name="body"> <div class="section"> <div class="mainHeading"> Payment Instructions </div> </div> <div class="section"> <s:link view="/facelets/pdf/contractIdFormPdf.xhtml" value="ID Form "/> </div> </ui:define> </ui:composition>
contractIdFormPdf.xhtml -- extremely simple useless pdf file, which is not showing
<p:document xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:p="http://jboss.com/products/seam/pdf"> <p:paragraph>This pdf is generated and then display by using s:link</p:paragraph> </p:document>
Currently, I am using
JBoss EPP 4.3 CP02
Seam 2.2.0 GA
JBoss Porlet Brigde 2.0.0.Final
RichFaces 3.3.3.BETA1