You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by kape <er...@gmail.com> on 2011/09/26 22:15:03 UTC
Re: Including External Tiles in a Template
I'm having a similar problem and was hoping someone could post sample code.
I'm a front-end developer and am not too comfortable with Java but need to
write this custom renderer so I can get to the front-end JSP components.
So similar to Brian, I would like to be able to refer to a JSP template that
is located in another application. This is because the header template, for
example, is identical across six web application, and my goal is to have one
common application that contains all the common templates and refer to these
templates in all six other web applications.
I attempted to write a renderer but as I mentioned above, I don't really
know what I'm doing and since it appears to be fairly straight forward for
experienced Java developers, I was hoping someone could post the classes
needed to implement this solution.
Thanks
--
View this message in context: http://struts.1045723.n5.nabble.com/Including-External-Tiles-in-a-Template-tp3552714p4842776.html
Sent from the tiles users mailing list archive at Nabble.com.
Re: Including External Tiles in a Template
Posted by Nicolas LE BAS <ma...@nlebas.net>.
Hi!
As Antonio pointed out, this is a rather old thread and you may have
easier solutions nowadays, depending on what you're trying to achieve.
If you just want to avoid code duplication, you've got a real problem
with JSP before JavaEE 6. Grouping common JSPs in a separate webapp will
just lead to more trouble because each webapp maintains its own user
session (and authentication, unless you're using SSO, which is not
trivial either).
With JavaEE 6 you can put JSPs under META-INF/resources into a simple
JAR file, and share the JAR like any other JAR between your webapps.
With older servers, I'd advise a switch to velocity or freemarker: since
the template engine is under the control of the application and not the
server, it will provide you with the flexibility you need.
hope this helps,
Nick
On 11-09-26 04:15 PM, kape wrote:
> I'm having a similar problem and was hoping someone could post sample code.
> I'm a front-end developer and am not too comfortable with Java but need to
> write this custom renderer so I can get to the front-end JSP components.
>
> So similar to Brian, I would like to be able to refer to a JSP template that
> is located in another application. This is because the header template, for
> example, is identical across six web application, and my goal is to have one
> common application that contains all the common templates and refer to these
> templates in all six other web applications.
>
> I attempted to write a renderer but as I mentioned above, I don't really
> know what I'm doing and since it appears to be fairly straight forward for
> experienced Java developers, I was hoping someone could post the classes
> needed to implement this solution.
>
> Thanks
>
> --
> View this message in context: http://struts.1045723.n5.nabble.com/Including-External-Tiles-in-a-Template-tp3552714p4842776.html
> Sent from the tiles users mailing list archive at Nabble.com.
Re: Including External Tiles in a Template
Posted by Antonio Petrelli <an...@gmail.com>.
2011/9/27 kape <er...@gmail.com>
> First of all, I'm really disappointed at how helpful your response was
> Antonio. Second of all, how is my problem not similar? It's the EXACT
> same
> problem. I want to "include an external tile in a template definition"
> which is exactly what Brian was asking for. I merely asked for an example.
> Thanks anyway.
>
>
Sorry I mistook this thread, I thought it was another.
Anyway this thread is about a thing 2 years ago. Please start another
thread, we have not such memory :-D
So please, if you want to reintroduce this topic, start a new thread.
Antonio
Re: Including External Tiles in a Template
Posted by kape <er...@gmail.com>.
First of all, I'm really disappointed at how helpful your response was
Antonio. Second of all, how is my problem not similar? It's the EXACT same
problem. I want to "include an external tile in a template definition"
which is exactly what Brian was asking for. I merely asked for an example.
Thanks anyway.
--
View this message in context: http://struts.1045723.n5.nabble.com/Including-External-Tiles-in-a-Template-tp3552714p4845028.html
Sent from the tiles users mailing list archive at Nabble.com.
Re: Including External Tiles in a Template
Posted by Antonio Petrelli <an...@gmail.com>.
No kape, you haven't a "similar problem", please do not hijack others'
threads and start your own asking what you need.
Antonio
2011/9/26 kape <er...@gmail.com>
> I'm having a similar problem and was hoping someone could post sample code.
> I'm a front-end developer and am not too comfortable with Java but need to
> write this custom renderer so I can get to the front-end JSP components.
>
> So similar to Brian, I would like to be able to refer to a JSP template
> that
> is located in another application. This is because the header template,
> for
> example, is identical across six web application, and my goal is to have
> one
> common application that contains all the common templates and refer to
> these
> templates in all six other web applications.
>
> I attempted to write a renderer but as I mentioned above, I don't really
> know what I'm doing and since it appears to be fairly straight forward for
> experienced Java developers, I was hoping someone could post the classes
> needed to implement this solution.
>
> Thanks
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/Including-External-Tiles-in-a-Template-tp3552714p4842776.html
> Sent from the tiles users mailing list archive at Nabble.com.
>