This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

duplicate result in jsp  RSS feed

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i check the values from jsp page by using System.out.println("value:" +value), but it generate the result twice as duplicated from tomcat console...why is it so ? can i avoid it ? thank you !
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you wrote it somewhere inside the loop or somewhere where it got executed twice or you wrote the same thing somewhere else such as in your servlet or some other handler class. otherwise no way.
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
adeel , may be you have a look on the code sample

Sample Code
 
Murthy Cherukumilli
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi alvin,
It looks like your action is being called twice check your jsp code and the strutsconfig.xml
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check your jsp code and the strutsconfig.xml


What makes you think he's using Struts? (He may well be, but nothing in his post indicates that).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!