This content has been marked as final.
Show 2 replies
-
1. Re: Absolute path to Seam application subdirectories
oleg_p Apr 13, 2008 12:00 PM (in response to oleg_p)OK, I will change the description of my question.
What I really need is the availability of ServletContext for my application-scoped Seam component, which has a method marked with @Observer(
org.jboss.seam.postInitialization
).As I understood this issue has been already addressed:
http://jira.jboss.org/jira/browse/JBSEAM-1246So can you please tell which API I should use for accessing ServletContext during the startup?
Thanks,
Oleg -
2. Re: Absolute path to Seam application subdirectories
oleg_p Apr 13, 2008 11:40 PM (in response to oleg_p)After reading the description in JBoss JIRA one more time it looks like it is my fault.
I haven't seen the date of latest comment:
Christian Bauer [10/Apr/08 10:48 PM]
I renamed this issue because what we really need is a way to access the ServletContext when the SeamListener starts up. Only at that time can you use getResourcePaths() and getResourceAsStream() to look for and process files in your deployment (which the Seam scanner does not cover). This is required to build internal registries in applications, e.g. "all names of directories in my view folder in /templates/".
The Initialization.java class currently has a private reference to that ServletContext we need, during startup. We need to expose this with an API, also without conflicting with the request-based ServletContexts.instance() API already present.10th of April 2008... so it will take some time until this feature will become available in Seam. And I will have to stick with some workarounds for now :-(