Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

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:



 
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!