• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

help converting asp appliction to servlets

Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Everyone
Mostly everything I do here at work is web-based application using active server pages. I have finally gotten the ok from my boss however to convert one of the apps to servlets. The problem I’ve got is how exactly to set it up. The basic layout is:
There is one vb script that is scheduled in the task manager to run every 10 minutes over a several hour period – all this does is go to a directory and get database files that have been uploaded from remote offices and then insert any new records from these into the master database. That part is fairly straight forward – It’ll just be a servlet that does the same function as the vb script but instead of being scheduled it’ll sleep for 10 minutes after it runs each time.
The next part is where I start to feel a little lost. There is a need to pull data out of the database as the reports are being filed (not real time, but as close as it can be). The way it works now is that every time the HTML/ASP page is requested the asp code is run and it pulls all of the data and does all of the manipulations, sorting and checking, then it displays it all on an html page to the user. This will obviously be another servlet but my confusion is on how to have it work.
The database is fairly large and the queries fairly intensive and it can take a few seconds to extract and process all of the data that is needed from it. There will only be a handful of users viewing the html page at any time. This servlet would be called from the first only if new data is added to the db. My question is whether or not it is better to have the servlet do all of the processing and just output the HTML to a file to be saved for the user that way there is only one html file and the whole thing doesn’t need to be generated for every request. Or is this defeating the purpose of servlets and I should just have an application on the server that does the same thing and creates an html file.
There will be other reports and tables needed from the data but these will be much less db intensive so they will be just servlets themselves that will send the html to the user. My only question here, is it better to have some sort of main controller servlet that will get the request and then pass it to the appropriate responder or have the requests just go the individual servlets.
Sorry if these questions seem sort of basic. I can create and use a servlets but have never actually used one here at work and if I can make it work well and better than the existing way then I might be able to open the door for more java apps and servlets in the future.
Any advise or tips you care to share would be grest.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic