Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

URGENT!!

 
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 all,
my code works in the following manner.
i have a central controller which is a servlet.
i am using the model 2 architecture (MVC) pattern.
all request go to this servlet which sees in the properties file and calls the corresponding business object(logic which is a class).
This class returns a XML file which i have to display on the browser.
my problem is suppose another request comes before the earlier xml file is thrown on the browser, then this file is replaced.
i thought of placing this file in the session..
Is there any other better way to do this..
Certainly all u champs out there can help me on this..
Thanx in advance
Chhaya
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was just wondering,
so you must be having some kind of code like this...
void someMethod(){
try{
id= request.getParameter(<something> );
BusObj busObj = busobjHash.get(id);
...
//render it on browser using
//requestdispatcher?

}
one simple solution could be to synchronize someMethod() so that all the requests are sent in a serialized manner
But this will bring down the performance?
prav.

Originally posted by Chhaya Dhanani:
hi all,
my code works in the following manner.
i have a central controller which is a servlet.
i am using the model 2 architecture (MVC) pattern.
all request go to this servlet which sees in the properties file and calls the corresponding business object(logic which is a class).
This class returns a XML file which i have to display on the browser.
my problem is suppose another request comes before the earlier xml file is thrown on the browser, then this file is replaced.
i thought of placing this file in the session..
Is there any other better way to do this..
Certainly all u champs out there can help me on this..
Thanx in advance
Chhaya


 
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic