Struts: losing session attributes while redirecting
Hello everyone,
while redirecting from one action to another, I'm losing some attributes that were in session scope. Maybe anyone would help me figure out why?
On my first action, I have:
session.setAttribute("itevenList",itevenList);
session.setAttribute("prod",addDelUpdItevenForm.getProduto());
return mapping.findForward("success");
if I check here, before the return, both parameters have its values correctly setted.
But then I redirect it to a second action where I have:
prod = (String) request.getSession().getAttribute(prod);
produto = ProdutoService.getInstance().getProduto(prod);
My attribute from the session comes null. The funny thing is that if I check the other value I had put on the session (itevenList) it is there correctly!
My config is:
<action
path="/AddItevenPedidoList"
type="auge.action.AddItevenPedidoListAction"
name="addDelUpdItevenForm"
scope="session"
parameter="action"
validate="true"
input="/pages/pedido/produtoPedidoDados.jsp">
<forward name="success" path="/DadosProduto.do"/>
<forward name="corInvalida" path="/pages/pedido/produtoPedidoDados.jsp"/>
<forward name="error" path="/Error.do"/>
<forward name="naoLogado" path="/NaoLogado.do"/>
</action>
Can anyone help me figure out?
Thanks

