Re: Preload All Pages On Startup
Just wanted to comment that I do the same thing at startup and look at annotations attached to the pages, and construct menu items for the pages which have the right kind of annotation. The annotation I made also has a parameter fir the type of page, so the menu items get a corresponding icon. :-) On Jun 25, 2014 7:49 AM, "Thiago H de Paula Figueiredo" wrote: > On Wed, 25 Jun 2014 05:58:36 -0300, Net Dawg > wrote: > > On server startup, what is the best way to preload all *.tml under >> [...]resources[...]pages?With all defaults - locale, etc. >> > > Templates themselves are tightly tied to their class counterparts, so > preloading just templates wouldn't make a difference. Dmitry's solution > should work for preloading classes and templats. > > In other words, how are tapestry (5.3.x) pages mapped to servlets so that >> something like this may be attempted in web.xml? >> > > Tapestry doesn't map pages to servlets. Tapestry isn't implemented as a > servlet, but as a servlet filter, so every request passes through it, even > when Tapestry itself doesn't generate the response. > > -- > Thiago H. de Paula Figueiredo > Tapestry, Java and Hibernate consultant and developer > http://machina.com.br > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Preload All Pages On Startup
On Wed, 25 Jun 2014 05:58:36 -0300, Net Dawg wrote: On server startup, what is the best way to preload all *.tml under [...]resources[...]pages?With all defaults - locale, etc. Templates themselves are tightly tied to their class counterparts, so preloading just templates wouldn't make a difference. Dmitry's solution should work for preloading classes and templats. In other words, how are tapestry (5.3.x) pages mapped to servlets so that something like this may be attempted in web.xml? Tapestry doesn't map pages to servlets. Tapestry isn't implemented as a servlet, but as a servlet filter, so every request passes through it, even when Tapestry itself doesn't generate the response. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Preload All Pages On Startup
You can try this: @Inject private ComponentClassResolver componentClassResolver; @Inject private ComponentSource componentSource; // then if your code: List pageNames = componentClassResolver.getPageNames(); for (String pageName : pageNames) { componentSource.getPage(pageName); } On Wed, Jun 25, 2014 at 12:58 PM, Net Dawg wrote: > On server startup, what is the best way to preload all *.tml under > [...]resources[...]pages?With all defaults - locale, etc. > > > In other words, how are tapestry (5.3.x) pages mapped to servlets so that > something like this may be attempted in web.xml? > > > > >Employees >Employees > > org.apache.tapestry.ApplicationServlet >2 > -- Dmitry Gusev AnjLab Team http://anjlab.com
Preload All Pages On Startup
On server startup, what is the best way to preload all *.tml under [...]resources[...]pages? With all defaults - locale, etc. In other words, how are tapestry (5.3.x) pages mapped to servlets so that something like this may be attempted in web.xml? Employees Employees org.apache.tapestry.ApplicationServlet 2