• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Redirecting to another action, i loose the data persistence

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:



 
reply
    Bookmark Topic Watch Topic
  • New Topic