Re: Where to store site settings?
Quick question on this topic about configuration. Has anyone tried having separate configs for hibernate.cfg.xml and/or log4j.properties i.e. production/QA/development? I was looking at commons-configuration and have it setup with spring via tapestry-spring. Would like a way to move the configs mentioned above into it as well? My next thought is to look at when log4j and hibernate are initialized to inject them with a configuration from spring that way I can manage all the config using commons-configuration. Thoughts or ideas are appreciated? Earle On Wed, Sep 28, 2011 at 12:53 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: I typically have a bunch of application specific symbols since they allow so much flexibility. Set the defaults in AppModule, override with jvm system properties, in your setup scripts for production environment etc. Kalle On Wed, Sep 28, 2011 at 9:47 AM, Tim koop...@gmail.com wrote: Can someone please tell me the best way to store site settings in a Tapestry application? I would like to store the location of a certain directory (where Lucene data is to be kept), and it is different in development and in production, so I don't want it hard coded into the code. Where should I store this setting? In a properties file? (and if so, where do I store the location to the properties files?) In the web.xml file as a context-param? In app.properties? What do people out there do? I suspect the answer is probably app.properties, so how do I get access to this in a normal Java class? Thanks. -- Tim Koop - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Integrating tapestry with Sakai
On Thu, Jun 23, 2011 at 12:20 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Thu, 23 Jun 2011 00:23:59 -0300, Earle Nietzel earle.niet...@gmail.com wrote: Hello, Hi! I have recently begun using the Tapestry 5 framework a few months ago and have been very satisfied with it (actually am very impressed with it). :) I am working with another open source project called Sakai which is an LMS for Higher Ed. which uses a conglomeration of Java web frameworks like: Velocity JSF Wicket JSP Not at the same time, I guess. ;) Nope Sakai is a conglomeration of about 25 core webapps and has another 30 in contrib. Each of those webapps choose the web framework that they wish to use but never 2 in one webapp. For webapps that need to expose their functionality it also uses the shared classloader to stick its api's in and an additional classloader (components) that holds the impl's. I would like to add Tapestry to the list. Nice! The problem is that sakai expects to work with a servlet and tries to access a RequestDispatcher from the servlet context and then forwards the call to the right tool. Does tapestry uses a web filter instead of a servlet? Yes. I'd try to use Sakai with Tapestry without any changes before saying changes need to be done so they can work together. Have you done this? Yes I did try, I see that Tapestry loads up but when accessing the tool from within Sakai it complains that the tool does not have a RequestDispatcher. It attempts to retrieve the RequestDispatcher from the servlet context but obviously there is know servlet! If so it looks like support may have to be added to handle tool registration for those of a type filter. Sakai is open-source (so says Wikipedia), so I guess you can rewrite the Sakai servlet filter as a Tapestry RequestFilter without much effort if needed. I think I will need to add the bits for it to handle a filter in sakai's (ActiveToolComponent). I will report back when I have further news. Thanks for the comment Thiago, Earle -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Integrating tapestry with Sakai
Hi Taha, Yes it was very helpful, thank you for your input. Earle On Thu, Jun 23, 2011 at 1:44 AM, Taha Hafeez tawus.tapes...@gmail.com wrote: Hi Earle, I did something similar with cometd, if you are interested you may find this posting interesting http://tawus.wordpress.com/2011/06/13/tapestry-magic-15-integration-with-cometd/ May be if I find sometime, I will try it myself. regards Taha On Thu, Jun 23, 2011 at 9:50 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Thu, 23 Jun 2011 00:23:59 -0300, Earle Nietzel earle.niet...@gmail.com wrote: Hello, Hi! I have recently begun using the Tapestry 5 framework a few months ago and have been very satisfied with it (actually am very impressed with it). :) I am working with another open source project called Sakai which is an LMS for Higher Ed. which uses a conglomeration of Java web frameworks like: Velocity JSF Wicket JSP Not at the same time, I guess. ;) I would like to add Tapestry to the list. Nice! The problem is that sakai expects to work with a servlet and tries to access a RequestDispatcher from the servlet context and then forwards the call to the right tool. Does tapestry uses a web filter instead of a servlet? Yes. I'd try to use Sakai with Tapestry without any changes before saying changes need to be done so they can work together. Have you done this? If so it looks like support may have to be added to handle tool registration for those of a type filter. Sakai is open-source (so says Wikipedia), so I guess you can rewrite the Sakai servlet filter as a Tapestry RequestFilter without much effort if needed. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Integrating tapestry with Sakai
Hello, I have recently begun using the Tapestry 5 framework a few months ago and have been very satisfied with it (actually am very impressed with it). I am working with another open source project called Sakai which is an LMS for Higher Ed. which uses a conglomeration of Java web frameworks like: Velocity JSF Wicket JSP I would like to add Tapestry to the list. Sakai has a filter (sakai.request) that wraps access to all its tools and is responsible for maintaining session, it is configured in the following way: Sakai RequestFilter: filter filter-namesakai.request/filter-name filter-classorg.sakaiproject.util.RequestFilter/filter-class /filter filter-mapping filter-namesakai.request/filter-name servlet-namesakai.profile2/servlet-name dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping Here is a Sample Sakai tool that uses wicket with Spring integration: servlet servlet-namesakai.profile2/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value /init-param init-param param-nameapplicationBean/param-name param-valueprofileApplication/param-value /init-param /servlet servlet-mapping servlet-namesakai.profile2/servlet-name url-pattern/sakai-profile2/*/url-pattern /servlet-mapping The problem is that sakai expects to work with a servlet and tries to access a RequestDispatcher from the servlet context and then forwards the call to the right tool. Does tapestry uses a web filter instead of a servlet? If so it looks like support may have to be added to handle tool registration for those of a type filter. Comments are most welcome. Earle