This content has been marked as final.
Show 3 replies
-
1. Re: How to serve some static PDF-files with enabled DocumentStoreServlet?
wassenama Aug 20, 2009 11:16 PM (in response to gena)I have this very same issue...hoping someone has an answer.
-
2. Re: How to serve some static PDF-files with enabled DocumentStoreServlet?
ludgertheile Sep 14, 2009 9:51 AM (in response to gena)I got a solution by overriding the Method
protected String baseUrlForContent(String baseName, String extension)
of the DocumentStore
import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Install; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; import org.jboss.seam.document.DocumentStore; @Name("org.jboss.seam.document.documentStore") @Scope(ScopeType.CONVERSATION) @Install(precedence = Install.APPLICATION) public class SdispoDocumentStore extends DocumentStore { private static final long serialVersionUID = 8127699198478477789L; @Override protected String baseUrlForContent(String baseName, String extension) { String baseUrl = "generated/" + super.baseUrlForContent(baseName, extension); return baseUrl; } }
And in web.xml:
... <!-- Seam PDF Documents --> <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>/generated/*</url-pattern> </servlet-mapping> ...
But, it whould be nice to do this only by configuration.
-
3. Re: How to serve some static PDF-files with enabled DocumentStoreServlet?
lvdberg Sep 14, 2009 10:13 AM (in response to gena)Maybe you should use the s:download or s:resource tags ?