You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "zhouyanming (JIRA)" <ji...@apache.org> on 2009/11/15 09:15:14 UTC
[jira] Created: (WW-3330) <@s.action> broken in sitemesh freemarker
decorator page
<@s.action> broken in sitemesh freemarker decorator page
--------------------------------------------------------
Key: WW-3330
URL: https://issues.apache.org/struts/browse/WW-3330
Project: Struts 2
Issue Type: Bug
Components: Plugin - SiteMesh
Reporter: zhouyanming
Assignee: Musachy Barroso
Priority: Blocker
broken since this patch https://issues.apache.org/struts/browse/WW-3291
<div id="left"><@s.action name="left" executeResult="true" /></div>
<div id="content">${body}</div>
<div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WW-3330) <@s.action> broken in sitemesh freemarker
decorator page
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso updated WW-3330:
--------------------------------
Fix Version/s: 2.2.0
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso resolved WW-3330.
---------------------------------
Resolution: Fixed
please test it and let me know. thanks for reporting.
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47068#action_47068 ]
Musachy Barroso commented on WW-3330:
-------------------------------------
an you provide more details on what is not working? I tested it in showcase which has this: <s:action var="dateAction" name="date" namespace="/" executeResult="true" /> and it works. Could it be a FreeMarker thing? I need to test that
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47069#action_47069 ]
Musachy Barroso commented on WW-3330:
-------------------------------------
yeah, it works from jsp, but it is broken from freemarker
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47082#action_47082 ]
Musachy Barroso commented on WW-3330:
-------------------------------------
can you describe your environment?
Are you using sitemesh? if yes, what are you suing for the sitemesh templates? (freemarker, velocty, jsp)
from what kind of template are you using the action tag? (freemarker it seems)
what kind of template is using the action that is called by the tag? (freemarker, velocity, jsp)
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "zhouyanming (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47072#action_47072 ]
zhouyanming commented on WW-3330:
---------------------------------
snapshot from hudson build is not up to date,so I try to build myself,many test case failed
Failed tests:
setUp(org.apache.struts2.views.jsp.ui.TokenTagTest)
setUp(org.apache.struts2.views.jsp.ui.OptGroupTest)
setUp(org.apache.struts2.views.jsp.ui.AnchorTest)
setUp(org.apache.struts2.config.SettingsTest)
setUp(org.apache.struts2.dispatcher.FilterTest)
setUp(org.apache.struts2.views.jsp.SortIteratorTagTest)
setUp(org.apache.struts2.dispatcher.HttpHeaderResultTest)
setUp(org.apache.struts2.views.jsp.PropertyTagTest)
setUp(org.apache.struts2.interceptor.validation.JSONValidationInterceptorTest)
setUp(org.apache.struts2.views.jsp.ui.DivTest)
setUp(org.apache.struts2.interceptor.MessageStoreInterceptorTest)
setUp(org.apache.struts2.views.jsp.DynAttribsTest)
setUp(org.apache.struts2.views.jsp.IteratorTagTest)
tearDown(org.apache.struts2.views.jsp.IteratorTagTest)
testStaticExecute(org.apache.struts2.dispatcher.ng.StrutsPrepareAndExecuteFilterIntegrationTest)
testActionMappingLookup(org.apache.struts2.dispatcher.ng.StrutsPrepareAndExecuteFilterIntegrationTest)
test404(org.apache.struts2.dispatcher.ng.StrutsPrepareAndExecuteFilterIntegrationTest)
testUriPatternExclusion(org.apache.struts2.dispatcher.ng.StrutsPrepareAndExecuteFilterIntegrationTest)
testStaticFallthrough(org.apache.struts2.dispatcher.ng.StrutsPrepareAndExecuteFilterIntegrationTest)
test200(org.apache.struts2.dispatcher.ng.StrutsPrepareAndExecuteFilterIntegrationTest)
setUp(org.apache.struts2.views.jsp.ui.FileTest)
setUp(org.apache.struts2.interceptor.validation.AnnotationValidationInterceptorTest)
setUp(org.apache.struts2.views.jsp.ui.RadioTest)
setUp(org.apache.struts2.dispatcher.DispatcherTest)
setUp(org.apache.struts2.views.jsp.IfTagTest)
setUp(org.apache.struts2.views.jsp.TextTagTest)
setUp(org.apache.struts2.views.util.ContextUtilTest)
setUp(org.apache.struts2.interceptor.RolesInterceptorTest)
setUp(org.apache.struts2.views.jsp.ui.ActionMessageTagTest)
setUp(org.apache.struts2.interceptor.CookieInterceptorTest)
setUp(org.apache.struts2.interceptor.ServletConfigInterceptorTest)
setUp(org.apache.struts2.dispatcher.FilterDispatcherTest)
setUp(org.apache.struts2.views.jsp.ui.ValidationStylesTest)
tearDown(org.apache.struts2.views.jsp.ui.ValidationStylesTest)
setUp(org.apache.struts2.dispatcher.VelocityResultTest)
setUp(org.apache.struts2.views.jsp.IteratorGeneratorTagTest)
setUp(org.apache.struts2.interceptor.MultiselectInterceptorTest)
setUp(org.apache.struts2.interceptor.ExecuteAndWaitInterceptorTest)
testFilterInMiddle(org.apache.struts2.dispatcher.ng.TwoFilterIntegrationTest)
test200(org.apache.struts2.dispatcher.ng.TwoFilterIntegrationTest)
testStaticFallthrough(org.apache.struts2.dispatcher.ng.TwoFilterIntegrationTest)
test404(org.apache.struts2.dispatcher.ng.TwoFilterIntegrationTest)
testStaticExecute(org.apache.struts2.dispatcher.ng.TwoFilterIntegrationTest)
setUp(org.apache.struts2.interceptor.FileUploadInterceptorTest)
setUp(org.apache.struts2.views.jsp.ui.OptionTransferSelectTagTest)
setUp(org.apache.struts2.components.FormButtonTest)
setUp(org.apache.struts2.components.ActionComponentTest)
setUp(org.apache.struts2.views.freemarker.FreeMarkerResultTest)
setUp(org.apache.struts2.views.jsp.ui.CheckboxTest)
setUp(org.apache.struts2.views.jsp.PushTagTest)
setUp(org.apache.struts2.dispatcher.ServletActionRedirectResultTest)
setUp(org.apache.struts2.views.freemarker.FreemarkerManagerTest)
setUp(org.apache.struts2.util.StrutsUtilTest)
setUp(org.apache.struts2.views.jsp.ui.JspTemplateTest)
setUp(org.apache.struts2.views.jsp.ui.SelectTest)
setUp(org.apache.struts2.dispatcher.StrutsResultSupportTest)
setUp(org.apache.struts2.components.FormTest)
tearDown(org.apache.struts2.components.FormTest)
setUp(org.apache.struts2.views.jsp.ui.DateTagTest)
setUp(org.apache.struts2.views.jsp.ui.TooltipTest)
tearDown(org.apache.struts2.views.jsp.ui.TooltipTest)
setUp(org.apache.struts2.views.jsp.ui.UpDownSelectTagTest)
setUp(org.apache.struts2.views.jsp.ElseTagTest)
setUp(org.apache.struts2.views.jsp.ui.TextareaTest)
setUp(org.apache.struts2.views.jsp.ui.FieldErrorTagTest)
setUp(org.apache.struts2.views.jsp.ui.DoubleSelectTest)
setUp(org.apache.struts2.views.jsp.ui.TextfieldTest)
setUp(org.apache.struts2.dispatcher.PlainTextResultTest)
setUp(org.apache.struts2.dispatcher.mapper.Restful2ActionMapperTest)
setUp(org.apache.struts2.views.jsp.ui.HiddenTest)
setUp(org.apache.struts2.views.jsp.AppendIteratorTagTest)
setUp(org.apache.struts2.views.jsp.BeanTagTest)
setUp(org.apache.struts2.views.jsp.ElseIfTagTest)
setUp(org.apache.struts2.views.jsp.ActionTagTest)
setUp(org.apache.struts2.components.PropertyTest)
setUp(org.apache.struts2.views.jsp.ui.FormTagTest)
tearDown(org.apache.struts2.views.jsp.ui.FormTagTest)
setUp(org.apache.struts2.views.jsp.ui.ResetTest)
setUp(org.apache.struts2.views.xslt.XSLTResultTest)
setUp(org.apache.struts2.views.jsp.ui.ComponentTest)
setUp(org.apache.struts2.views.jsp.ui.PasswordTest)
setUp(org.apache.struts2.views.jsp.ui.LabelTest)
setUp(org.apache.struts2.dispatcher.StreamResultTest)
setUp(org.apache.struts2.views.jsp.ui.ActionErrorTagTest)
setUp(org.apache.struts2.views.jsp.SetTagTest)
tearDown(org.apache.struts2.views.jsp.SetTagTest)
setUp(org.apache.struts2.views.jsp.URLTagTest)
tearDown(org.apache.struts2.views.jsp.URLTagTest)
setUp(org.apache.struts2.interceptor.StrutsConversionErrorInterceptorTest)
setUp(org.apache.struts2.util.InvocationSessionStoreTest)
setUp(org.apache.struts2.views.util.UrlHelperTest)
setUp(org.apache.struts2.views.jsp.MergeIteratorTagTest)
setUp(org.apache.struts2.components.AnotherActionComponentTest)
setUp(org.apache.struts2.dispatcher.ServletRedirectResultTest)
setUp(org.apache.struts2.views.jsp.IncludeTagTest)
setUp(org.apache.struts2.views.jsp.ui.ComboBoxTest)
setUp(org.apache.struts2.interceptor.CheckboxInterceptorTest)
setUp(org.apache.struts2.interceptor.TokenSessionStoreInterceptorTest)
setUp(org.apache.struts2.views.jsp.ui.InputTransferSelectTagTest)
setUp(org.apache.struts2.views.jsp.I18nTagTest)
setUp(org.apache.struts2.components.UIBeanTest)
setUp(org.apache.struts2.interceptor.ClearSessionInterceptorTest)
setUp(org.apache.struts2.views.jsp.SubsetIteratorTagTest)
setUp(org.apache.struts2.components.UIComponentTest)
setUp(org.apache.struts2.dispatcher.ServletDispatcherResultTest)
setUp(org.apache.struts2.views.freemarker.tags.TagModelTest)
setUp(org.apache.struts2.views.jsp.AnchorTagTest)
tearDown(org.apache.struts2.views.jsp.AnchorTagTest)
setUp(org.apache.struts2.views.jsp.ui.HeadTagTest)
setUp(org.apache.struts2.views.jsp.ui.CheckboxListTest)
setUp(org.apache.struts2.interceptor.CreateSessionInterceptorTest)
setUp(org.apache.struts2.components.ComponentTest)
setUp(org.apache.struts2.views.freemarker.FreemarkerTest)
setUp(org.apache.struts2.interceptor.TokenInterceptorTest)
setUp(org.apache.struts2.views.jsp.ui.SubmitTest)
setUp(org.apache.struts2.dispatcher.mapper.DefaultActionMapperTest)
Tests run: 2027, Failures: 116, Errors: 0, Skipped: 1836
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "zhouyanming (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47083#action_47083 ]
zhouyanming commented on WW-3330:
---------------------------------
I use freemarker everywhere and latest sitemesh plugin
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "zhouyanming (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47078#action_47078 ]
zhouyanming commented on WW-3330:
---------------------------------
I use this build http://hudson.zones.apache.org/hudson/job/struts2/180/org.apache.struts$struts2-core/
still not works.
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "zhouyanming (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47227#action_47227 ]
zhouyanming commented on WW-3330:
---------------------------------
finally I find a solution
1.add a few lines code to org.apache.struts2.views.freemarker.FreemarkerResult.preTemplateProcess(Template template, TemplateModel model)
if(ServletActionContext.getRequest().getAttribute(StrutsStatics.STRUTS_ACTION_TAG_INVOCATION) != null){
response.setContentType(null); //trigger com.opensymphony.module.sitemesh.filter.PageResponseWrapper.deactivateSiteMesh()
return true;
}
2.refactor code in com.opensymphony.module.sitemesh.filter.PageResponseWrapper.setContentType(String type)
public void setContentType(String type) {
boolean deactivate = false;
if (type != null) {
super.setContentType(type);
HttpContentType httpContentType = new HttpContentType(type);
if (parserSelector.shouldParsePage(httpContentType.getType())) {
activateSiteMesh(httpContentType.getType(), httpContentType.getEncoding());
} else {
deactivate = true;
}
}else{
deactivate = true;
}
if(deactivate)
deactivateSiteMesh();
}
this solution have such restriction
1.must hack sitemesh
2.response.setContentType(null); is incompatibility with non-sitemesh app,it will override previous ContentType.
Is there any perfect solution to trigger deactivateSiteMesh?
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (WW-3330) <@s.action> broken in sitemesh
freemarker decorator page
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-3330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso reopened WW-3330:
---------------------------------
> <@s.action> broken in sitemesh freemarker decorator page
> --------------------------------------------------------
>
> Key: WW-3330
> URL: https://issues.apache.org/struts/browse/WW-3330
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - SiteMesh
> Reporter: zhouyanming
> Assignee: Musachy Barroso
> Priority: Blocker
> Fix For: 2.2.0
>
>
> broken since this patch https://issues.apache.org/struts/browse/WW-3291
> <div id="left"><@s.action name="left" executeResult="true" /></div>
> <div id="content">${body}</div>
> <div id="right"><@s.action name="right" executeResult="true" /></div>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.