GeeCON Prague 2014*
The moose likes Servlets and the fly likes unstable output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "unstable output" Watch "unstable output" New topic
Author

unstable output

kittu basant
Greenhorn

Joined: May 17, 2008
Posts: 11
Hi,
I have developed a application in MVC framework. Where it includes few jsps, servlets and class files.
As per the application,
1.The first jsp would take the inputs from user,(Selects the various points from it check box) which later will display the respective data from data base of the selected points in the second jsp.
2.The User has to select the data displayed by checking the check boxes.
3. This data is posted to servlet for some calculation.
4.The 3rd jsp would display the calculated values of respected data selected in 2nd jsp.
My issue is, the flow works perfectly fine when developing and running on server(Tomcat5.5) in the eclipse.But when deployed in the Tomcat server separately, the out put in 3rd jsp is inconsistent. Since the number of data selected in 2nd jsp would not be reflected in 3rdjsp,as some data is not visble.

Can you please help why this inconsistence when delpoyed and when debugging/developing in eclipe with the same server.

regards,
Kittu


regards,<br />kittu basant
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3220
Did you retry it a number of times inside eclipse? Did you declare any variables in a thread unsafe manner? Inconsistent outputs can be due to concurrency issues?

[ August 18, 2008: Message edited by: arulk pillai ]
[ August 18, 2008: Message edited by: arulk pillai ]

Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
kittu basant
Greenhorn

Joined: May 17, 2008
Posts: 11
Hi arul,
Thanks for responding. As per your suggestion, i tried refreshing the 3rd jsp several times. Initially it was fine but after several refresh the data became inconsistence.
Can you please help me, what could be the cause?? .I am not familar with the concurrency part, can you just breif me about it and any suggestions for correcting the same.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61310
    
  66

Are you putting Java in your JSPs? If so, you should stop. And if you are, you should avoid scriptlet declarations as they are the easiest way to introduce threading issues into a JSP.

Are there any instance variables in your servlets? If so, remove them.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: unstable output