Quantcast

integrating struts2 with a CMS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

integrating struts2 with a CMS

Christopher Cheng-2
I have a request from my client to integrate a CMS into an existing application using Struts/Tiles2 or SiteMesh for presentation.

Could I integrate a JCR compatible CMS into tiles2? For example, is it possible to have something like this?

<definition name="index" template="/jsp/myapp/layout/layout.jsp">
    <put-attribute name="navigationBar" type="jcr" value="${requestScope.document.html}"/>
    <put-attribute name="header" value="/jsp/myapp/layout/header.jsp"/>
    <put-attribute name="footer" value="/jsp/myapp/layout/footer.jsp"/>
</definition>

That means some of the pages, we use jsp and some of the pages, the contents are retrieved from CMS?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: integrating struts2 with a CMS

Lukasz Lenart
2017-02-04 7:21 GMT+01:00 Christopher Cheng <[hidden email]>:

> I have a request from my client to integrate a CMS into an existing application using Struts/Tiles2 or SiteMesh for presentation.
>
> Could I integrate a JCR compatible CMS into tiles2? For example, is it possible to have something like this?
>
> <definition name="index" template="/jsp/myapp/layout/layout.jsp">
>     <put-attribute name="navigationBar" type="jcr" value="${requestScope.document.html}"/>
>     <put-attribute name="header" value="/jsp/myapp/layout/header.jsp"/>
>     <put-attribute name="footer" value="/jsp/myapp/layout/footer.jsp"/>
> </definition>
>
> That means some of the pages, we use jsp and some of the pages, the contents are retrieved from CMS?

I think you can implement your own Renderer and register it

https://tiles.apache.org/framework/config-reference.html#Renderers
https://tiles.apache.org/tiles-request/apidocs/org/apache/tiles/request/render/Renderer.html
https://github.com/apache/struts/blob/master/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java#L122-L133


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: integrating struts2 with a CMS

Christopher Cheng-2
Is there any out of the box solution using other view framework such as SiteMesh that can get contents from JCR compatible CMS?

-----Original Message-----
From: Lukasz Lenart [mailto:[hidden email]]
Sent: Saturday, 4 February 2017 2:32 PM
To: Struts Users Mailing List <[hidden email]>
Subject: Re: integrating struts2 with a CMS

2017-02-04 7:21 GMT+01:00 Christopher Cheng <[hidden email]>:

> I have a request from my client to integrate a CMS into an existing application using Struts/Tiles2 or SiteMesh for presentation.
>
> Could I integrate a JCR compatible CMS into tiles2? For example, is it possible to have something like this?
>
> <definition name="index" template="/jsp/myapp/layout/layout.jsp">
>     <put-attribute name="navigationBar" type="jcr" value="${requestScope.document.html}"/>
>     <put-attribute name="header" value="/jsp/myapp/layout/header.jsp"/>
>     <put-attribute name="footer" value="/jsp/myapp/layout/footer.jsp"/>
> </definition>
>
> That means some of the pages, we use jsp and some of the pages, the contents are retrieved from CMS?

I think you can implement your own Renderer and register it

https://tiles.apache.org/framework/config-reference.html#Renderers
https://tiles.apache.org/tiles-request/apidocs/org/apache/tiles/request/render/Renderer.html
https://github.com/apache/struts/blob/master/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java#L122-L133


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: integrating struts2 with a CMS

Christoph Nenning
There is a sitemesh plugin, not sure if it fits in your case:

https://cwiki.apache.org/confluence/display/S2PLUGINS/Sitemesh+Plugin


Regards,
Christoph



"Christopher Cheng" <[hidden email]> schrieb am 05.02.2017
04:10:06:

> From: <[hidden email]>
> To: "'Struts Users Mailing List'" <[hidden email]>,
> Date: 05.02.2017 09:46
> Subject: RE: integrating struts2 with a CMS
> Sent by: "Christopher Cheng" <[hidden email]>
>
> Is there any out of the box solution using other view framework such
> as SiteMesh that can get contents from JCR compatible CMS?
>
> -----Original Message-----
> From: Lukasz Lenart [mailto:[hidden email]]
> Sent: Saturday, 4 February 2017 2:32 PM
> To: Struts Users Mailing List <[hidden email]>
> Subject: Re: integrating struts2 with a CMS
>
> 2017-02-04 7:21 GMT+01:00 Christopher Cheng
<[hidden email]>:

> > I have a request from my client to integrate a CMS into an
> existing application using Struts/Tiles2 or SiteMesh for presentation.
> >
> > Could I integrate a JCR compatible CMS into tiles2? For example,
> is it possible to have something like this?
> >
> > <definition name="index" template="/jsp/myapp/layout/layout.jsp">
> >     <put-attribute name="navigationBar" type="jcr" value="$
> {requestScope.document.html}"/>
> >     <put-attribute name="header"
value="/jsp/myapp/layout/header.jsp"/>
> >     <put-attribute name="footer"
value="/jsp/myapp/layout/footer.jsp"/>

> > </definition>
> >
> > That means some of the pages, we use jsp and some of the pages,
> the contents are retrieved from CMS?
>
> I think you can implement your own Renderer and register it
>
> https://tiles.apache.org/framework/config-reference.html#Renderers
> https://tiles.apache.org/tiles-request/apidocs/org/apache/tiles/
> request/render/Renderer.html
> https://github.com/apache/struts/blob/master/plugins/tiles/src/main/
> java/org/apache/struts2/tiles/StrutsTilesContainerFactory.java#L122-L133
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

This Email was scanned by Sophos Anti Virus
Loading...