0

I have the next escenario, I'll hope that you can give support, thank a lot.

class Veh {
String id;
String engine;
setter getter.......; 
}

In my apps in my firts action charge session struts map with a Veh object of car instance.

class Car extends Veh{
boolean roof;
....setter getter...;
}
class Bike extends Veh{
String helmetBrand;
....setter getter...;
}

After that, I have been redirected in many action without problem, but in one of them in Firefox browser I had debugging this and I could check that SUCCESS return, and I had checked the id value in this case Session object Veh instance Car object have id that I hope, but when arrive to first sentence of execute method in the next action lost id value....

Which could be the detail in this it?

erod
  • 181
  • 1
  • 17
  • Did you lost only id or the object itself? – Roman C Mar 01 '21 at 21:37
  • Mr Roman, only the id property, only in this redirect actionand only in firefox. – erod Mar 01 '21 at 21:38
  • The question is not clear. Even without details it is impossible to give you a saint answer, rather than letting you know about parameters that are lost when you use redirect result type. – Roman C Mar 02 '21 at 04:49

1 Answers1

0

I could resolve.

In Firefox by some reason, it is that happened.

  1. The request charge without problem data object Veh and id like a property String of action idVeh.

  2. In this jsp page, I charge, a list with this kind of Veh, and I set idVeh (action property of managing struts) in an input hidden field like identifier of site view.

  3. In a back time I comment hidden eve field because I saw that unnecessary and comment in action idVeh property, but some reason struts put this value property like the value of Veh.id.

  4. Never set Veh.id property with this(String idVeh) value, instead I set a String eve property with Veh.id property.

  5. Only in Firefox when the response went arrive to action it set String idVeh to Veh.id property value.

I'll hope it helps.

erod
  • 181
  • 1
  • 17