Including External Tiles in a Template

Including External Tiles in a Template

What is the best way to include an external tile in a template definition?

For example, suppose I have an a web application called INTERNAL. I have reusable view components in another application called EXTERNAL. So I want http://server:1234/INTERNAL/eligibilitySearch/search.action to include a common customer tile located in the EXTERNAL application. My definition I am imagining would look something like this:

Of course, the URL is not found, because value refers to the application context. I know there is not a type called redirect, but that is the type of functionality I'm looking for, to reset the context so that an external tile can be included in the definition.

Regards,
Brian Stewart

This message is confidential, intended only for the named recipient
and may contain information that is privileged or exempt from
disclosure under applicable law. If you are not the intended
recipient, you are notified that the dissemination, distribution or
copying of this message is strictly prohibited. If you receive
this message in error, or are not the named recipient, please
notify the sender at the email address listed above.

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.

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

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.

Re: Including External Tiles in a Template

> 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.

Re: Including External Tiles in a Template

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.