• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating dynamic content jsp for questionaire

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to create a jsp which is questionaire/survey form. the jsp page needs to be consists of Questions, answer type((radio, drop down, textbox, date)), answer options to be desplayed on the screen. All these are coming from DB including answer_type of each question. I need help in using collections and displaying this on JSP page. In Backend I am using DB2 and struts franmework.
screenshot.png
[Thumbnail for screenshot.png]
Jsp page screen
 
Saloon Keeper
Posts: 15484
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what are you having problems with?
 
Suruchi aggarwal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for looking into it. I want to write the java code for this
 
Sheriff
Posts: 67746
173
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
JSPs should have no Java code in them, so which is it? So you want to so this in JSP (using JSTL and EL), or in Java?

You'll need to be specific about what you need help with. Try writing some code and let us know what problems you are having.

And remember, no Java in a JSP!
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would recommend you start simple
- Define your model
- Display Questions on a JSP (no interactivity - just list all the questions)
- start with one type of question - maybe multi choice question via a radio button.

Once you have that working, then start adding new features - other question types etc.

There will naturally be java code involved in this web application and as Bear has pointed out, it should live in Java classes rather than your JSP.
The struts framework should help you with following the MVC architecture.


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic