You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Łukasz Uruski <lu...@nasza-klasa.pl> on 2012/09/25 16:37:32 UTC

How to precompile pages when tiles with jspx are being used ?

Hello
    Would like to precompile pages in project where tiles and jspx are 
being used. Anybody tried that ?

I was thinking about the following scenario:
1. assemble complete pages (preferably with some maven plugin)
2. use jspc-maven-plugin <http://mojo.codehaus.org/jspc-maven-plugin/> 
and precompile pages

,but couldn't achieve first step. Any ideas ?

thanks
Lukas

Re: How to precompile pages when tiles with jspx are being used ?

Posted by Nicolas LE BAS <ma...@nlebas.net>.
On 12-09-26 11:44 AM, Łukasz Uruski wrote:
> 2. dive into it's /WORK/ folder, where it keeps compiled, assembled pages

You won't find assembled pages. There are no assembled pages, not anywhere.

You assume tiles is using something like <%@include%>, but it doesn't.
It uses something like <jsp:include>. You can find a good explanation of
the difference here:
http://stackoverflow.com/questions/7879906/what-is-the-difference-between-jspinclude-page-and-include-file


Re: How to precompile pages when tiles with jspx are being used ?

Posted by Łukasz Uruski <lu...@nasza-klasa.pl>.
> That's a very interesting point you're raising; generating documentation
> about JSPs is not easy.
>
> How are you doing it? Inserting javadoc-like comments in a scriptlet in
> the JSP, then running JSPC and then Javadoc on the generated class?
That's exactly what I wanted to do.


>
> Tiles is really not assembling these pages before runtime.
>
> I can think of a solution by running Tiles 3 offline with a new renderer
> (to be developped) for JSPs that would generate the documentation. You
> would need a new autotag implementation, too. That's quite a lot of
> work, but it would be interesting.
Yeah, sounds reasonable and time consuming at the same time, so will 
most probably not go into this direction.

I thought also about sth like following:
1. deploy app on some server (e.g. jboss)
2. dive into it's /WORK/ folder, where it keeps compiled, assembled pages
3. generate docs

It's a nasty hack for me, but if there will be no other possibility ....

Anyway thanks for you time Nick.

Lukas




>
> On 12-09-26 04:22 AM, Łukasz Uruski wrote:
>> Thanks Nick for the tip, but I do need these pages before runtime.
>>
>> My goal is not to increase performance (at least in this case), but to
>> generate documentation and as such I need them assembled earlier.
>>
>>> Hello,
>>>
>>> There is no need for the first step actually. Tiles assembles the pages
>>> at runtime, after the JSPs have been compiled.
>>>
>>> Just skip the first step, the second step will provide you with optimal
>>> perfomance by itself.
>>>
>>> Hope this helps,
>>> Nick
>>>
>>> On 12-09-25 10:37 AM, Łukasz Uruski wrote:
>>>> Hello
>>>>      Would like to precompile pages in project where tiles and jspx are
>>>> being used. Anybody tried that ?
>>>>
>>>> I was thinking about the following scenario:
>>>> 1. assemble complete pages (preferably with some maven plugin)
>>>> 2. use jspc-maven-plugin<http://mojo.codehaus.org/jspc-maven-plugin/>
>>>> and precompile pages
>>>>
>>>> ,but couldn't achieve first step. Any ideas ?
>>>>
>>>> thanks
>>>> Lukas
>>>>
>>
>


-- 
Łukasz Uruski
Java Architect

e-mail: lukasz.uruski@nasza-klasa.pl

Nasza Klasa sp. z o.o.
ul. Gen. J. Bema 2, 50-265 Wrocław

Sąd Rejonowy dla Wrocławia-Fabrycznej we Wrocławiu
VI Wydział Gospodarczy Krajowego Rejestru Sądowego
KRS: 0000289629, NIP: 898-21-22-104 REGON: 020586020
Kapitał zakładowy: 67 850,00 PLN


Re: How to precompile pages when tiles with jspx are being used ?

Posted by Nicolas LE BAS <ma...@nlebas.net>.
That's a very interesting point you're raising; generating documentation
about JSPs is not easy.

How are you doing it? Inserting javadoc-like comments in a scriptlet in
the JSP, then running JSPC and then Javadoc on the generated class? Or
do you have your own JSP parser for that?

Tiles is really not assembling these pages before runtime.

I can think of a solution by running Tiles 3 offline with a new renderer
(to be developped) for JSPs that would generate the documentation. You
would need a new autotag implementation, too. That's quite a lot of
work, but it would be interesting.

On 12-09-26 04:22 AM, Łukasz Uruski wrote:
> Thanks Nick for the tip, but I do need these pages before runtime.
> 
> My goal is not to increase performance (at least in this case), but to
> generate documentation and as such I need them assembled earlier.
> 
>> Hello,
>>
>> There is no need for the first step actually. Tiles assembles the pages
>> at runtime, after the JSPs have been compiled.
>>
>> Just skip the first step, the second step will provide you with optimal
>> perfomance by itself.
>>
>> Hope this helps,
>> Nick
>>
>> On 12-09-25 10:37 AM, Łukasz Uruski wrote:
>>> Hello
>>>     Would like to precompile pages in project where tiles and jspx are
>>> being used. Anybody tried that ?
>>>
>>> I was thinking about the following scenario:
>>> 1. assemble complete pages (preferably with some maven plugin)
>>> 2. use jspc-maven-plugin<http://mojo.codehaus.org/jspc-maven-plugin/>
>>> and precompile pages
>>>
>>> ,but couldn't achieve first step. Any ideas ?
>>>
>>> thanks
>>> Lukas
>>>
>>
> 
> 


Re: How to precompile pages when tiles with jspx are being used ?

Posted by Łukasz Uruski <lu...@nasza-klasa.pl>.
Thanks Nick for the tip, but I do need these pages before runtime.

My goal is not to increase performance (at least in this case), but to 
generate documentation and as such I need them assembled earlier.

> Hello,
>
> There is no need for the first step actually. Tiles assembles the pages
> at runtime, after the JSPs have been compiled.
>
> Just skip the first step, the second step will provide you with optimal
> perfomance by itself.
>
> Hope this helps,
> Nick
>
> On 12-09-25 10:37 AM, Łukasz Uruski wrote:
>> Hello
>>     Would like to precompile pages in project where tiles and jspx are
>> being used. Anybody tried that ?
>>
>> I was thinking about the following scenario:
>> 1. assemble complete pages (preferably with some maven plugin)
>> 2. use jspc-maven-plugin<http://mojo.codehaus.org/jspc-maven-plugin/>
>> and precompile pages
>>
>> ,but couldn't achieve first step. Any ideas ?
>>
>> thanks
>> Lukas
>>
>


-- 
Łukasz Uruski
Java Architect

e-mail: lukasz.uruski@nasza-klasa.pl

Nasza Klasa sp. z o.o.
ul. Gen. J. Bema 2, 50-265 Wrocław

Sąd Rejonowy dla Wrocławia-Fabrycznej we Wrocławiu
VI Wydział Gospodarczy Krajowego Rejestru Sądowego
KRS: 0000289629, NIP: 898-21-22-104 REGON: 020586020
Kapitał zakładowy: 67 850,00 PLN


Re: How to precompile pages when tiles with jspx are being used ?

Posted by Nicolas LE BAS <ma...@nlebas.net>.
Hello,

There is no need for the first step actually. Tiles assembles the pages
at runtime, after the JSPs have been compiled.

Just skip the first step, the second step will provide you with optimal
perfomance by itself.

Hope this helps,
Nick

On 12-09-25 10:37 AM, Łukasz Uruski wrote:
> Hello
>    Would like to precompile pages in project where tiles and jspx are
> being used. Anybody tried that ?
> 
> I was thinking about the following scenario:
> 1. assemble complete pages (preferably with some maven plugin)
> 2. use jspc-maven-plugin <http://mojo.codehaus.org/jspc-maven-plugin/>
> and precompile pages
> 
> ,but couldn't achieve first step. Any ideas ?
> 
> thanks
> Lukas
>