Re: Freemarker sitemesh decorator does not render struts 2.2.1 action tag

2010-10-16 Thread Maurizio Cucchiara
Hi Derrick,
I just upload a patch that should fix the problem you have mentioned.



2010/10/4 Derrick Koes :
> Ah, this appears to be a known issue.  Please see WW-3330 at 
> https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&pid=12311041&sorter/order=DESC&sorter/field=priority&resolution=-1&component=12313331
>
> This is a fairly major road block to upgrade.
>
>
>
> -Original Message-
> From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
> Sent: Monday, October 04, 2010 2:54 PM
> To: Struts Users Mailing List
> Subject: Re: Freemarker sitemesh decorator does not render struts 2.2.1 
> action tag
>
> You're right I didn't see the executeResult attribute in your action 
> directive.
> It's look like you find a new bug out.
> You should add a new issue: https://issues.apache.org/jira/browse/WW
>
> Maurizio Cucchiara
>
> 2010/10/4 Derrick Koes :
>> Why does the JSP version behave differently?  I.e. no reference to the 
>> property is necessary to get the action tag result output.  This difference 
>> isn't clear anywhere in documentation AFAIK.
>>
>> Also, I want the output of the entire action result.  My result may be 
>> considerably more complex than a simple date object.
>>
>> Thanks,
>> Derrick
>>
>>
>>
>> From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
>> Sent: Monday, October 04, 2010 11:33 AM
>> To: Struts Users Mailing List
>> Subject: Re: Freemarker sitemesh decorator does not render struts 2.2.1 
>> action tag
>>
>> Hi,
>> I think this is the expected result. In fact the follow line:
>> <@s.action var="dateAction" name="date" namespace="/" executeResult="true" />
>> initializes a dateAction reference (var) to the invoked action.
>> If you want to see your date you need to add this row
>> <@s.property value="#dateAction.date" />
>>
>> Did it work in that way before?
>>
>> Maurizio Cucchiara
>>
>> 2010/10/3 Derrick Koes 
>> mailto:derrick_k...@skillsoft.com>>
>> I am upgrading to struts 2.2.1, but realized there is an issue with 
>> freemarker sitemesh decorators which use the struts 2 action tag.  This is a 
>> regression from 2.1.8.1.
>>
>> To demonstrate the issue with a reasonably simple example I deployed the 
>> struts2-showcase-2.2.1 sample application.
>>
>> Then, ensuring the web.xml is set up to handle freemarker sitemesh 
>> decorators, I created a 'main.ftl' decorator based on the main.jsp decorator 
>> included in the app.  I modified the decorators.xml to use the main.ftl 
>> rather than the main.jsp decorator and restarted the app.  Note that the 
>> "date" action in the action tag within the freemarker sitemesh decorator 
>> runs as the variable usage for the year in the copyright line is correct.  
>> However, notice that the header is missing the date (as compared to the jsp 
>> version).
>>
>> Any help in further understanding or resolving the issue is appreciated.
>>
>> Below are the relevant files inlined (also attached).
>>
>> web.xml:
>>
>> 
>> >                xmlns="http://java.sun.com/xml/ns/j2ee";
>>                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>                xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>>
>>    Struts Showcase Application
>>
>>    
>>        struts-prepare
>>        
>> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
>>        
>>                actionPackages
>>                org.apache.struts2.showcase.person
>>        
>>    
>>
>>    
>>        struts-execute
>>        
>> org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
>>    
>>
>>
>>   
>>       sitemesh
>>       
>> com.opensymphony.sitemesh.webapp.SiteMeshFilter
>>   
>>
>>    
>>        struts-prepare
>>        /*
>>    
>>
>>    
>>        sitemesh
>>        /*
>>    
>>
>>    
>>        struts-execute
>>        /*
>>    
>>
>>    
>>        
>> org.springframework.web.context.ContextLoaderListener
>>    
>>
>>    
>>        
>>          org.apache.myfaces.webapp.StartupServletContextListener
>>        
>>    
>>
>>    
>>

RE: Freemarker sitemesh decorator does not render struts 2.2.1 action tag

2010-10-04 Thread Derrick Koes
Ah, this appears to be a known issue.  Please see WW-3330 at 
https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&pid=12311041&sorter/order=DESC&sorter/field=priority&resolution=-1&component=12313331

This is a fairly major road block to upgrade.



-Original Message-
From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
Sent: Monday, October 04, 2010 2:54 PM
To: Struts Users Mailing List
Subject: Re: Freemarker sitemesh decorator does not render struts 2.2.1 action 
tag

You're right I didn't see the executeResult attribute in your action directive.
It's look like you find a new bug out.
You should add a new issue: https://issues.apache.org/jira/browse/WW

Maurizio Cucchiara

2010/10/4 Derrick Koes :
> Why does the JSP version behave differently?  I.e. no reference to the 
> property is necessary to get the action tag result output.  This difference 
> isn't clear anywhere in documentation AFAIK.
>
> Also, I want the output of the entire action result.  My result may be 
> considerably more complex than a simple date object.
>
> Thanks,
> Derrick
>
>
>
> From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
> Sent: Monday, October 04, 2010 11:33 AM
> To: Struts Users Mailing List
> Subject: Re: Freemarker sitemesh decorator does not render struts 2.2.1 
> action tag
>
> Hi,
> I think this is the expected result. In fact the follow line:
> <@s.action var="dateAction" name="date" namespace="/" executeResult="true" />
> initializes a dateAction reference (var) to the invoked action.
> If you want to see your date you need to add this row
> <@s.property value="#dateAction.date" />
>
> Did it work in that way before?
>
> Maurizio Cucchiara
>
> 2010/10/3 Derrick Koes 
> mailto:derrick_k...@skillsoft.com>>
> I am upgrading to struts 2.2.1, but realized there is an issue with 
> freemarker sitemesh decorators which use the struts 2 action tag.  This is a 
> regression from 2.1.8.1.
>
> To demonstrate the issue with a reasonably simple example I deployed the 
> struts2-showcase-2.2.1 sample application.
>
> Then, ensuring the web.xml is set up to handle freemarker sitemesh 
> decorators, I created a 'main.ftl' decorator based on the main.jsp decorator 
> included in the app.  I modified the decorators.xml to use the main.ftl 
> rather than the main.jsp decorator and restarted the app.  Note that the 
> "date" action in the action tag within the freemarker sitemesh decorator runs 
> as the variable usage for the year in the copyright line is correct.  
> However, notice that the header is missing the date (as compared to the jsp 
> version).
>
> Any help in further understanding or resolving the issue is appreciated.
>
> Below are the relevant files inlined (also attached).
>
> web.xml:
>
> 
> xmlns="http://java.sun.com/xml/ns/j2ee";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>
>Struts Showcase Application
>
>
>struts-prepare
>
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
>
>actionPackages
>org.apache.struts2.showcase.person
>
>
>
>
>struts-execute
>
> org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
>
>
>
>   
>   sitemesh
>   
> com.opensymphony.sitemesh.webapp.SiteMeshFilter
>   
>
>
>struts-prepare
>/*
>
>
>
>sitemesh
>/*
>
>
>
>struts-execute
>/*
>
>
>
>
> org.springframework.web.context.ContextLoaderListener
>
>
>
>
>  org.apache.myfaces.webapp.StartupServletContextListener
>
>
>
>
>
>org.apache.struts2.tiles.StrutsTilesListener
>
>
>
>
>
>
>  org.apache.struts2.showcase.chat.ChatSessionListener
>
>
>
>
>
> org.apache.struts2.dispatcher.ng.listener.StrutsListener
>
>
>
>
>
>dwr
>uk.ltd.getahead.dwr.DWRServlet
>
>debug
>true
>
>
>
>
>
>faces
>
> javax.faces.webapp.FacesServlet
>1
> 

Re: Freemarker sitemesh decorator does not render struts 2.2.1 action tag

2010-10-04 Thread Maurizio Cucchiara
You're right I didn't see the executeResult attribute in your action directive.
It's look like you find a new bug out.
You should add a new issue: https://issues.apache.org/jira/browse/WW

Maurizio Cucchiara

2010/10/4 Derrick Koes :
> Why does the JSP version behave differently?  I.e. no reference to the 
> property is necessary to get the action tag result output.  This difference 
> isn't clear anywhere in documentation AFAIK.
>
> Also, I want the output of the entire action result.  My result may be 
> considerably more complex than a simple date object.
>
> Thanks,
> Derrick
>
>
>
> From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
> Sent: Monday, October 04, 2010 11:33 AM
> To: Struts Users Mailing List
> Subject: Re: Freemarker sitemesh decorator does not render struts 2.2.1 
> action tag
>
> Hi,
> I think this is the expected result. In fact the follow line:
> <@s.action var="dateAction" name="date" namespace="/" executeResult="true" />
> initializes a dateAction reference (var) to the invoked action.
> If you want to see your date you need to add this row
> <@s.property value="#dateAction.date" />
>
> Did it work in that way before?
>
> Maurizio Cucchiara
>
> 2010/10/3 Derrick Koes 
> mailto:derrick_k...@skillsoft.com>>
> I am upgrading to struts 2.2.1, but realized there is an issue with 
> freemarker sitemesh decorators which use the struts 2 action tag.  This is a 
> regression from 2.1.8.1.
>
> To demonstrate the issue with a reasonably simple example I deployed the 
> struts2-showcase-2.2.1 sample application.
>
> Then, ensuring the web.xml is set up to handle freemarker sitemesh 
> decorators, I created a 'main.ftl' decorator based on the main.jsp decorator 
> included in the app.  I modified the decorators.xml to use the main.ftl 
> rather than the main.jsp decorator and restarted the app.  Note that the 
> "date" action in the action tag within the freemarker sitemesh decorator runs 
> as the variable usage for the year in the copyright line is correct.  
> However, notice that the header is missing the date (as compared to the jsp 
> version).
>
> Any help in further understanding or resolving the issue is appreciated.
>
> Below are the relevant files inlined (also attached).
>
> web.xml:
>
> 
>                 xmlns="http://java.sun.com/xml/ns/j2ee";
>                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>                xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>
>    Struts Showcase Application
>
>    
>        struts-prepare
>        
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
>        
>                actionPackages
>                org.apache.struts2.showcase.person
>        
>    
>
>    
>        struts-execute
>        
> org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
>    
>
>
>   
>       sitemesh
>       
> com.opensymphony.sitemesh.webapp.SiteMeshFilter
>   
>
>    
>        struts-prepare
>        /*
>    
>
>    
>        sitemesh
>        /*
>    
>
>    
>        struts-execute
>        /*
>    
>
>    
>        
> org.springframework.web.context.ContextLoaderListener
>    
>
>    
>        
>          org.apache.myfaces.webapp.StartupServletContextListener
>        
>    
>
>    
>        
>            org.apache.struts2.tiles.StrutsTilesListener
>        
>    
>
>    
>    
>                
>                  org.apache.struts2.showcase.chat.ChatSessionListener
>                
>    
>
>    
>        
> org.apache.struts2.dispatcher.ng.listener.StrutsListener
>    
>
>    
>
>    
>        dwr
>        uk.ltd.getahead.dwr.DWRServlet
>        
>            debug
>            true
>        
>    
>
>                
>                
>                faces
>                    
> javax.faces.webapp.FacesServlet
>                1
>                
>                                
>                JspSupportServlet
>                
> org.apache.struts2.views.JspSupportServlet
>                1
>                
>
>      
>    
>        sitemesh-freemarker
>        
> org.apache.struts2.sitemesh.FreemarkerDecoratorServlet
>        
>            default_encoding
>            UTF-8
>        
>        1
>    
>
>    
>        sitemesh-velocity
>        
> org.apache.struts2.sitemesh.VelocityDecoratorServlet
&

RE: Freemarker sitemesh decorator does not render struts 2.2.1 action tag

2010-10-04 Thread Derrick Koes
Why does the JSP version behave differently?  I.e. no reference to the property 
is necessary to get the action tag result output.  This difference isn't clear 
anywhere in documentation AFAIK.

Also, I want the output of the entire action result.  My result may be 
considerably more complex than a simple date object.

Thanks,
Derrick



From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com]
Sent: Monday, October 04, 2010 11:33 AM
To: Struts Users Mailing List
Subject: Re: Freemarker sitemesh decorator does not render struts 2.2.1 action 
tag

Hi,
I think this is the expected result. In fact the follow line:
<@s.action var="dateAction" name="date" namespace="/" executeResult="true" />
initializes a dateAction reference (var) to the invoked action.
If you want to see your date you need to add this row
<@s.property value="#dateAction.date" />

Did it work in that way before?

Maurizio Cucchiara

2010/10/3 Derrick Koes 
mailto:derrick_k...@skillsoft.com>>
I am upgrading to struts 2.2.1, but realized there is an issue with freemarker 
sitemesh decorators which use the struts 2 action tag.  This is a regression 
from 2.1.8.1.

To demonstrate the issue with a reasonably simple example I deployed the 
struts2-showcase-2.2.1 sample application.

Then, ensuring the web.xml is set up to handle freemarker sitemesh decorators, 
I created a 'main.ftl' decorator based on the main.jsp decorator included in 
the app.  I modified the decorators.xml to use the main.ftl rather than the 
main.jsp decorator and restarted the app.  Note that the "date" action in the 
action tag within the freemarker sitemesh decorator runs as the variable usage 
for the year in the copyright line is correct.  However, notice that the header 
is missing the date (as compared to the jsp version).

Any help in further understanding or resolving the issue is appreciated.

Below are the relevant files inlined (also attached).

web.xml:


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

Struts Showcase Application


struts-prepare

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter

actionPackages
org.apache.struts2.showcase.person




struts-execute

org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter



   
   sitemesh
   
com.opensymphony.sitemesh.webapp.SiteMeshFilter
   


struts-prepare
/*



sitemesh
/*



struts-execute
/*




org.springframework.web.context.ContextLoaderListener




  org.apache.myfaces.webapp.StartupServletContextListener





org.apache.struts2.tiles.StrutsTilesListener






  org.apache.struts2.showcase.chat.ChatSessionListener





org.apache.struts2.dispatcher.ng.listener.StrutsListener





dwr
uk.ltd.getahead.dwr.DWRServlet

debug
true





faces

javax.faces.webapp.FacesServlet
1


JspSupportServlet

org.apache.struts2.views.JspSupportServlet
1


  

sitemesh-freemarker

org.apache.struts2.sitemesh.FreemarkerDecoratorServlet

default_encoding
UTF-8

1



sitemesh-velocity

org.apache.struts2.sitemesh.VelocityDecoratorServlet

default_encoding
UTF-8

1





faces
*.action



dwr
/dwr/*



sitemesh-freemarker
*.ftl



sitemesh-velocity
*.vm









index.jsp
default.jsp
index.html





decorators.xml:






/debug.jsp
/styles/*
/scripts/*
/images/*
/dojo/*
/struts/*
/ajax/AjaxResult*
/AjaxTest.action
/ajax/remoteforms/AjaxRemoteForm.action
/tags/ui/ajax/*
/chat/ajax/*
/hangman/ajax/*
/nodecorate/*



/*







main.ftl decorator:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

${title}

${head

Re: Freemarker sitemesh decorator does not render struts 2.2.1 action tag

2010-10-04 Thread Maurizio Cucchiara
Hi,
I think this is the expected result. In fact the follow line:

> *<@s.action var="dateAction" name="date" namespace="/"
> executeResult="true" />*
>
> initializes a dateAction reference (var) to the invoked action.
If you want to see your date you need to add this row
<@s.property value="#dateAction.date" />

Did it work in that way before?

Maurizio Cucchiara


2010/10/3 Derrick Koes 

>  I am upgrading to struts 2.2.1, but realized there is an issue with
> freemarker sitemesh decorators which use the struts 2 action tag.  This is a
> regression from 2.1.8.1.
>
>
>
> To demonstrate the issue with a reasonably simple example I deployed the
> struts2-showcase-2.2.1 sample application.
>
>
>
> Then, ensuring the web.xml is set up to handle freemarker sitemesh
> decorators, I created a ‘main.ftl’ decorator based on the main.jsp decorator
> included in the app.  I modified the decorators.xml to use the main.ftl
> rather than the main.jsp decorator and restarted the app.  Note that the
> “date” action in the action tag within the freemarker sitemesh decorator
> runs as the variable usage for the year in the copyright line is correct.
> However, notice that the header is missing the date (as compared to the jsp
> version).
>
>
>
> Any help in further understanding or resolving the issue is appreciated.
>
>
>
> Below are the relevant files inlined (also attached).
>
>
>
> web.xml:
>
>
>
> **
>
> *
> *xmlns="http://java.sun.com/xml/ns/j2ee"; *
>
> *xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; *
>
> *xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>*
>
> * *
>
> *Struts Showcase Application*
>
> **
>
> **
>
> *struts-prepare*
>
> *
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
> *
>
> **
>
> *actionPackages*
>
> *
> org.apache.struts2.showcase.person*
>
> **
>
> **
>
> * *
>
> **
>
> *struts-execute*
>
> *
> org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
> *
>
> **
>
> * *
>
> * *
>
> *   *
>
> *   sitemesh*
>
> *
> com.opensymphony.sitemesh.webapp.SiteMeshFilter
> *
>
> *   *
>
> * *
>
> **
>
> *struts-prepare*
>
> */**
>
> **
>
> * *
>
> **
>
> *sitemesh*
>
> */**
>
> **
>
> * *
>
> **
>
> *struts-execute*
>
> */**
>
> **
>
> * *
>
> **
>
> *
> org.springframework.web.context.ContextLoaderListener
> *
>
> **
>
> **
>
> **
>
> **
>
> *  org.apache.myfaces.webapp.StartupServletContextListener*
>
> **
>
> **
>
> * *
>
> **
>
> **
>
> *org.apache.struts2.tiles.StrutsTilesListener*
>
> **
>
> **
>
> **
>
> **
>
> **
>
> **
>
> *  org.apache.struts2.showcase.chat.ChatSessionListener*
>
> **
>
> **
>
> * *
>
> **
>
> *
> org.apache.struts2.dispatcher.ng.listener.StrutsListener
> *
>
> **
>
> **
>
> **
>
> * *
>
> **
>
> *dwr*
>
> *uk.ltd.getahead.dwr.DWRServlet*
>
> **
>
> *debug*
>
> *true*
>
> **
>
> **
>
> **
>
> **
>
> **
>
> *faces*
>
> *
> javax.faces.webapp.FacesServlet*
>
> *1*
>
> **
>
> **
>
> *JspSupportServlet*
>
> *
> org.apache.struts2.views.JspSupportServlet*
>
> *1*
>
> **
>
> * *
>
> *  *
>
> **
>
> *sitemesh-freemarker*
>
> *
> org.apache.struts2.sitemesh.FreemarkerDecoratorServlet
> *
>
> **
>
> *default_encoding*
>
> *UTF-8*
>
> **
>
> *1*
>
> **
>
> * *
>
> **
>
> *sitemesh-velocity*
>
> *
> org.apache.struts2.sitemesh.VelocityDecoratorServlet
> *
>
> **
>
> *default_encoding*
>
> *UTF-8*
>
> **
>
> *1*
>
> **
>
> * *
>
> * *
>
> **
>
> **
>
> *faces*
>
> **.action*
>
> **
>
> * *
>
> **
>
> *dwr*
>
> */dwr/**
>
> **
>
> * *
>
> **
>
> *sitemesh-freemarker*
>
> **.ftl*
>
> **
>
> * *
>
> **
>
> *sitemesh-velocity*
>
> **.vm*
>
> **
>
> * *
>
> **
>
> * *
>
> **
>
> * *
>
> **
>
> * *
>
> **
>
> *index.jsp*
>
> *default.jsp*
>
> *index.html*
>
> **
>
> * *
>
> **
>
>
>
>
>
> decorators.xml:
>
>
>
> **
>
> * *
>
> **
>
> **
>
> **
>
> */debug.jsp*
>
> */styles/**
>
> */scripts/**
>
> */images/**
>
> */dojo/**
>
> */struts/**
>
> */ajax/AjaxResult**
>
> */AjaxTest.action*
>
> */ajax/remoteforms/AjaxRemoteForm.acti