File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes bilingual questionnaire data - database or resources file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bilingual questionnaire data - database or resources file" Watch "bilingual questionnaire data - database or resources file" New topic
Author

bilingual questionnaire data - database or resources file

Preet Dhillon
Greenhorn

Joined: May 20, 2008
Posts: 24
I have a requirement to build an online questionnnaire in two languages using Sturts 2 framework. The questions are a combination of various form fields (eg. text, dropdown, radio and checkboxes) - roughly 15-20 questions.

I am trying to figure out a way to generate the questions for this questionnaire. What is the best approach - storing the questions in the database or in the resources file?

Thank you in advance.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30516
    
150

Resources seems better in case they add a third language. It also lets you use localization and internationalization features in Struts 2


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Preet Dhillon
Greenhorn

Joined: May 20, 2008
Posts: 24
Okay- Thank you.

So the two examples I've found so far on the Struts site are following:

First one has the i18n but no dropdowns and checkboxes ets... http://struts.apache.org/development/2.x/docs/processing-forms.html

Second one had the all the elements and uses array to populate but no i18n - http://struts.apache.org/development/2.x/docs/struts-2-form-tags.html

Second form is closer to what I need but how would I include i18n to this?

My apologies - I am very new to Struts and have little experience with Java/jsp/servlets.

I've gone through all tutoraial on the this site and have good understing of individual elements but little confused on combining it all.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: bilingual questionnaire data - database or resources file