Re: Parameters disappearing on redirectAction with namespaces.

2016-11-22 Thread Lukasz Lenart
2016-11-22 16:03 GMT+01:00  :
> Hi!
>
> Is there a way to log in detail what happens with parameters for
> redirectAction?
>
> I have an action method (listUsers) which is called through POST with
> the parameter "group.id".
>
> This works just fine, the redirect GET have the parameter appended to
> the URL.
>
>
> |  name="success" type="redirectAction">  name="actionName">groupusers  name="group.id">${group.id}  |
>
>
> But the moment I add a namespace to the package (e.g. "/strutsweb"), the
> parameter "group.id" disappears from the redirect.
>
> And I am completely lost on what could be the cause of this, so detailed
> logging on redirectAction is the hopefully a way to find the cause.

Struts version? Do you use `struts.url.includeParams`?
https://struts.apache.org/docs/url.html


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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Parameters disappearing on redirectAction with namespaces.

2016-11-22 Thread ts . resusturts
Hi!

Is there a way to log in detail what happens with parameters for
redirectAction?

I have an action method (listUsers) which is called through POST with
the parameter "group.id".

This works just fine, the redirect GET have the parameter appended to
the URL.


|  groupusers ${group.id}  |


But the moment I add a namespace to the package (e.g. "/strutsweb"), the
parameter "group.id" disappears from the redirect.

And I am completely lost on what could be the cause of this, so detailed
logging on redirectAction is the hopefully a way to find the cause.

Thanks.




Re: action tag with tile result causing StackOverflowError-

2016-11-22 Thread Christoph Nenning
In our apps we do similar things in a different way.


Our Tiles definition for layout looks like this:








Inside layout.jsp we insert the content provided by action like this:







Actions provide content by using annotations:

@TilesDefinition(
extend=".layout",
putAttributes={
@TilesPutAttribute(name="title", value="titel"),
@TilesPutAttribute(name="content",value="content.jsp")
}
)



Hope that helps!



Regards,
Christoph





> From: Vishal Jhagadiawala 
> To: Struts Users Mailing List , 
> Date: 21.11.2016 16:14
> Subject: Re: action tag with tile result causing StackOverflowError-
> 
> Hi Christoph,
> Please find my response below. 
> 
> Here is my actionTileResult.jsp (it is for test)
> actionResult.jsp
> This is text :
> 
> 
> 
> 
> - how should showcase.index.actionResult and showcase.index belong to 
each 
> other?   showcase.index is a global layout, and there are dynamic 
> pages based on action outcome eg . showcase.index.actionResult will 
> be included in the global layout
> 
> - shouldn't showcase.index.actionResult set the body attribute?
> currently to reproduce the issue, I have used title attribute, but 
> we tile definition can be more specific based on need
> 
> - why is there an  tag in layout.jsp?  this is to 
> include dynamic result based on outcome of the action logic. 
> 
> 
> Regards,
> Vishal
> 
> On Monday, 21 November 2016, 4:19, Christoph Nenning 
>  wrote:
> 
> 
>  Hi,
> 
> 
> some questions about your code snippets:
> 
> - how does actionResult.jsp look?
> - how should showcase.index.actionResult and showcase.index belong to 
each 
> other?
> - shouldn't showcase.index.actionResult set the body attribute?
> - why is there an  tag in layout.jsp?
> 
> 
> Regards,
> Christoph
> 
> 
> 
> > From: Vishal Jhagadiawala 
> > To: Struts Users Mailing List , 
> > Date: 19.11.2016 20:55
> > Subject: Re: action tag with tile result causing StackOverflowError-
> > 
> > Hi ,
> > I also verified the exactly same error happens in struts 2.5.5 with 
> > tiles 3.0.7.
> > if we try to use action tag as below with tiles result it's goes in 
> > infinite loop and throws it throws java.lang.StackOverflowError,
> > 
> > 
> > Layout.jsp 
> > 
> >  Notice that this is a layout
> > made in JSP > name="myTestAction" namespace="/tiles" 
> executeResult="true"/>
> > 
> > - struts.xml  
> > showcase.index.actionResult  
> > showcase.index.actionResult > result>  --tiles.xml
> >
> >  > value="Action Result"/>
> > 
> >  Let me know if somebody faced same issue. 
> > Regards,Vishal
> > 
> >On Saturday, 19 November 2016, 10:28, Vishal Jhagadiawala 
> >  wrote:
> > 
> > 
> >  Hi ,
> > I have upgraded my struts application to version 2.3.30 and apache-
> > tiles 2.2.2 and I am facing issue with s:action tag and tiles 
> > result. it goes in recursive loop and throws StackOverflowError as 
> below. 
> > also I am able to reproduce this issue in showcase application, I 
> > have outlined the tiles.xml , struts-tile.xml and layout.jsp as below. 

> > it throws java.lang.StackOverflowError: null at 
> > org.apache.catalina.core.ApplicationHttpRequest.getAttribute
> > (ApplicationHttpRequest.java:230)at 
> > org.apache.catalina.core.ApplicationHttpRequest.getAttribute
> > (ApplicationHttpRequest.java:230) at 
> > org.apache.catalina.core.ApplicationHttpRequest.getAttribute
> > (ApplicationHttpRequest.java:230) at 
> > org.apache.catalina.core.ApplicationHttpRequest.getAttribute
> > (ApplicationHttpRequest.java:230) .. (truncated) 
> > .at 
> > com.opensymphony.xwork2.DefaultActionInvocation.invoke
> > (DefaultActionInvocation.java:245) at 
> > com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept
> > (AliasInterceptor.java:193) at 
> > com.opensymphony.xwork2.DefaultActionInvocation.invoke
> > (DefaultActionInvocation.java:245) at 
> > 
> 
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept
> > (ExceptionMappingInterceptor.java:189) at 
> > com.opensymphony.xwork2.DefaultActionInvocation.invoke
> > (DefaultActionInvocation.java:245) at 
> > org.apache.struts2.impl.StrutsActionProxy.execute
> > (StrutsActionProxy.java:54) at 
> > org.apache.struts2.components.ActionComponent.executeAction
> > (ActionComponent.java:288) at 
> > org.apache.struts2.components.ActionComponent.end
> > (ActionComponent.java:172) at 
> > org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag
> > (ComponentTagSupport.java:42) at 
> > 
> 
org.apache.jsp.WEB_002dINF.tiles.layout_jsp._jspx_meth_s_005faction_005f0
> > (layout_jsp.java:210) at 
> > 
>