• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Redirecting to another action, i loose the data persistence

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i've an action that adds an article into the basket. Returning the string "SUCCESS", according to what i've setted into the struts.xml file, i redirect the user to another action called ShowCatalog.


the problem is that in ManageBasket class i've a variable that i need inside the showCatalog.jsp, but considering that this page is shown after that i call another action, i'm unable to retrieve it... Some solutions?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Luca Coraggio wrote:Hi, i've an action that adds an article into the basket. Returning the string "SUCCESS", according to what i've setted into the struts.xml file, i redirect the user to another action called ShowCatalog.


the problem is that in ManageBasket class i've a variable that i need inside the showCatalog.jsp, but considering that this page is shown after that i call another action, i'm unable to retrieve it... Some solutions?



Could you post the code where you redirect to the second jsp?
 
Luk Cora
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What code? There are no reference to the redirection inside the code itself, it's only a configuration that can be done throught struts.xml, as shown above
 
Richard Le
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Luca Coraggio wrote:What code? There are no reference to the redirection inside the code itself, it's only a configuration that can be done throught struts.xml, as shown above



I'm sorry, I didn't understand your question at the beginning. You should add the parameters in your result tag like this:



 
I need a new interior decorator. This tiny ad just painted every room in my house purple.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic