Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

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 prefer to see a URL that contains the actual document name and extension — /myDocument.pdf, for example. To serve fully named files, the DocumentStoreServlet must contain mappings for each document type:
<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>DOCUMENT_TYPE</url-pattern> 
</servlet-mapping>
Copy to Clipboard Toggle word wrap
DOCUMENT_TYPE can take on the following values:
  • *.pdf
  • *.xls
  • *.csv
To include multiple document types, add a <servlet-mapping> element, with <servlet-name> and <url-pattern> sub-elements, for each desired document type.
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
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat