Este contenido no está disponible en el idioma seleccionado.

18.6. Configuring iText


Document generation itself requires no additional configuration, but some minor configuration can make your application more user-friendly.
The default implementation serves PDF documents from a generic URL, /seam-doc.seam. Many users would prefer to see a URL that contains the actual PDF name — /myDocument.pdf, for example — which requires some configuration. To serve PDF files, all *.pdf resources must be mapped to the DocumentStoreServlet:
<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>
Copy to Clipboard Toggle word wrap
The use-extensions option instructs the DocumentStore component to generate URLs with the correct filename extension for the generated document type.
<components xmlns="http://jboss.com/products/seam/components" 
            xmlns:document="http://jboss.com/products/seam/document" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation=" 
                http://jboss.com/products/seam/document 
                http://jboss.com/products/seam/document-2.2.xsd 
                http://jboss.com/products/seam/components 
                http://jboss.com/products/seam/components-2.2.xsd"> 
  <document:document-store use-extensions="true"/> 
</components>
Copy to Clipboard Toggle word wrap
The DocumentStore holds documents in conversation scope, so documents will expire when the conversation ends. At that point, references to the document will be invalid. Specify a default view to show when a document does not exist by editing the error-page property of documentStore.
<document:document-store use-extensions="true" 
          error-page="/documentMissing.seam" />
Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat