• 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

Request Value getting retained

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I use a simple web application that uses struts2 (view)- tiles (view) - Spring - Hibernate.
It is working fine. I have a strange behaviour explained below.

1. Consider I have form. I fill up the text boxes, select boxes and press Submit. The values are getting displayed. Perfect!
2. If I go to any other page and coming to the previous page again. The old values given are still retained by default and results are displayed as per the earlier selection.
3. This condition became worse when I have a try to insert records being fetched in the form. The records are getting duplicated with incremented IDs in database.

Hope I am clear to you. Do you know what could be causing this issue?

Thanks in advance
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not without knowing more details. My first assumption would be that you're defining your actions in the Spring config file and not making them prototype scope.
 
Pandian Ramaiah
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,
Thanks for your comments. Sorry I am a new bie.

here is my struts.xml declaration

<action name="comparisonAction" class="comparisonAction">
<result name="SUCCESS" type="tiles">comparison</result>
</action>



This is my spring context config

<bean id="comparisonAction" class="com.grassfield.lic.view.ComparisonAction">
<property name="licService" ref="licService" />
</bean>


Thanks
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My initial assumption was correct.
 
Pandian Ramaiah
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Great. Thanks David! it worked!
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad to hear you figured it out!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic