• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

An advice on design approach for developing a webpage

Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

Today, I started thinking about writing a mock exam in a generic way. What I meant here is, this exam should be able to generate a HTML file for any mock test say, SCJP, SCDJWS etc...

My thought is to have the questions and answers written out in some text file and based on the text file, the html page needs to be generated dynamically, reading through the files.

I could have done this easily with jsp, servlets by reading the files and creating question and answer objects, storing them in the session and retrieving them in the jsp and displaying it.. seems possible for me with jsp and servlets. But I wanted to check, if this can be achieved by plain HTML and javascript.

The reason for this design approach is to have the link to the plain HTML to be hosted on existing sites like javaranch (if they permit) for the benefit of certification aspirants, (as I do not own any domain of mine). I do not want to have my application depend on the availability of any servlet containers and hence wanted to stick with plain HTML.

I can statically put the questions and answers in HTML but that would defeat my purpose of making it generic. I was thinking, if the host permits, a template HTML file and plain text files (having questions and answers) are supplied and they host them on their servers and upon requesting the html page, a script reads those files and create objects (which is possilbe for me till this point). But I'm just lost on how to access those variables in the HTML page.

I have a some experience in working on javascript and web development but have not encountered this kind of requirement before.

So, first of all, can some one correct me, if my design is wrong and guide me in the correct direction and any suggestions on my problem.

Posts: 67637
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure, if I want to avoid relying upon JSP and servlets, I'd create a RESTful web service to serve up the data as JSON and use jQuery/Ajax to develop the pages.
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic