Hi,
Is there a way to configure/set a start up process in OPS? I need to set some application level variables (just once when application starts). It will be used by other pages .xpl files. I know I can use scop-generator to set the variable into application level. But I only need to set it once when the application starts. And not within any page. Is there any way to do it? Thanks, Emily Zhou -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Emily,
You can do this with Servlet Context Listeners: http://www.orbeon.com/ops/doc/reference-listeners#servlet-context-listener These react to Servlet context initialization and destruction. Some listeners are in place by default in OPS, and run the following two pipelines: oxf:/context/context-initialized.xpl oxf:/context/context-destroyed.xpl You are free to just modify these pipelines to perform your initialization and destruction tasks. -Erik PS: Note that the new names in the online documentation (OPSServletContextListener and OPSSessionListener) only work with the latest builds. Otherwise you should use the old names OXFServletContextListener and OXFSessionListener, which still work for backward compatibility. [hidden email] wrote: > Hi, > > Is there a way to configure/set a start up process in OPS? > > > I need to set some application level variables (just once when > application starts). It will be used by other pages .xpl files. > > I know I can use scop-generator to set the variable into application level. But I only need to set it once when the application starts. And not within any page. > > > Is there any way to do it? > > > > Thanks, > > > > Emily Zhou -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by ezhou
It worked.
Thanks, Emily Zhou -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] Sent: Thursday, December 08, 2005 10:17 AM To: [hidden email] Subject: Re: [ops-users] Suggestions for application variables? Emily, You can do this with Servlet Context Listeners: http://www.orbeon.com/ops/doc/reference-listeners#servlet-context-listen er These react to Servlet context initialization and destruction. Some listeners are in place by default in OPS, and run the following two pipelines: oxf:/context/context-initialized.xpl oxf:/context/context-destroyed.xpl You are free to just modify these pipelines to perform your initialization and destruction tasks. -Erik PS: Note that the new names in the online documentation (OPSServletContextListener and OPSSessionListener) only work with the latest builds. Otherwise you should use the old names OXFServletContextListener and OXFSessionListener, which still work for backward compatibility. [hidden email] wrote: > Hi, > > Is there a way to configure/set a start up process in OPS? > > > I need to set some application level variables (just once when > application starts). It will be used by other pages .xpl files. > > I know I can use scop-generator to set the variable into application level. But I only need to set it once when the application starts. And not within any page. > > > Is there any way to do it? > > > > Thanks, > > > > Emily Zhou CONFIDENTIALITY NOTICE: The information contained in this e-mail and attached document(s) may contain confidential information that is intended only for the addressee(s). If you are not the intended recipient, you are hereby advised that any disclosure, copying, distribution or the taking of any action in reliance upon the information is prohibited. If you have received this e-mail in error, please immediately notify the sender and delete it from your system. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |