> I need to elaborate a bit...

Way to much work for me. The problem is that i don't need Tiles myself but
i'm compiling information for a struts2+freemarker+spring+hibernate-course
i'm giving. If tiles2.1 support for freemarker is not working the students
will have to work with tiles2.0 (albeit not having wildcards hurts quite a
bit. you really need one definition for every body content, don't you?).

So now i replaced the tiles2.1-libs with the tiles.2.0.6-libs, TilesListener
with StrutsTilesListener and my wildcard definition with a non-wildcard
definition. Unfortunately now i got a FreeMarker template error:

Expression JspTaglibs is undefined on line 1, column 16 in
layout/simpleLayout.ftl.
The problematic instruction:
----------
==> assignment: tiles=JspTaglibs["http://tiles.apache.org/tags-tiles";] [on
line 1, column 1 in layout/simpleLayout.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression JspTaglibs is
undefined on line 1, column 16 in layout/simpleLayout.ftl.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
        at
freemarker.core.DynamicKeyName._getAsTemplateModel(DynamicKeyName.java:75)
        at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
        ....

<#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles";]> doesn't
seem to be loaded, so after reading 
http://cwiki.apache.org/WW/freemarker-tags.html this (look at the bottum)  i
add
<servlet>
    <servlet-name>JspSupportServlet</servlet-name>
   
<servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
to the web.xml. But now i get an StackOverflowError:
description
The server encountered an internal error () that prevented it from
fulfilling this request.
exception 
javax.servlet.ServletException: Filter execution threw an exception
root cause 
java.lang.StackOverflowError
        org.apache.tomcat.util.buf.C2BConverter.convert(C2BConverter.java:81)
        org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:438)
        org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:143)
        freemarker.ext.jsp.JspWriterAdapter.write(JspWriterAdapter.java:162)
        java.io.PrintWriter.write(Unknown Source)
        freemarker.ext.jsp.JspWriterAdapter.write(JspWriterAdapter.java:162)
        java.io.PrintWriter.write(Unknown Source)
        .....

What is missing now?

Regards,
Stephan



Antonio Petrelli-3 wrote:
> 
> 2008/10/29 Antonio <[EMAIL PROTECTED]>:
>>> Now that the StrutsTilesListener is incompatible with Tile2.1 what can i
>>> do?
>>
>> You might modify that code of StrutsTilesListener and, if you like,
>> post a patch to the Struts group. I think they might like it :-D (I
>> have commit privileges, so I could commit your patch).
> 
> I need to elaborate a bit. The current Struts 2/Tiles 2 integration is
> a bit "patched", since it supports only partially the results of
> Struts 2 and does not call the necessary code of
> TilesContainerFactory.
> I would create a StrutsTilesContainerFactory for Tiles 2.1, leaving
> the one for 2.0 for compatibility reasons. Probably the new concept of
> "Attribute renderer" could help a bit:
> http://tiles.apache.org/framework/tutorial/advanced/attribute-rendering.html
> The big problem is that Struts 2 manages FreeMarker without the
> FreeMarker servlet. This poses a big problem if someone wants to use
> FreeMarker for other purposes.
> 
> But there's another choice: use Tiles "without" Struts support. Struts
> tags will be loaded anyway if you force the servlet to process the
> "include" of resources. See
> https://issues.apache.org/struts/browse/TILES-228?focusedCommentId=42840#action_42840
> 
> Anyway, for further questions about the Struts2/Tiles2 plugin ask the
> Struts mailing list because it is developed there.
> 
> Antonio
> 
> 

-- 
View this message in context: 
http://www.nabble.com/neccessary-stepts-to-use-Struts-2%2BFreeMarker%2BTiles2.1-tp20209482p20228871.html
Sent from the tiles users mailing list archive at Nabble.com.

Reply via email to