Hi everybody,
This mail is from a complete beginner in JSP. (for people who hate
newbie quesitons).
I want to create a form which will have a list of questions. The
questions as well as the answers to it needs to be saved into the database.
The way I have implemented it currently is - having JavaScript arrays
which will have all the questions, call a servlet which will parse out the
data and save it to the database. The parsing logic is becoming pretty ugly
very soon as these questions itself have a lot of sub-sections. When I pass
the data to the servlet (put it in a hidden field!), I store values in the
array in a string and since I know how it is encoded, I decode the string in
the servlet.
I do not like the way I have implemented it. After exploring some
options, I beleive JSP would be a good choice. I need some tips.hints here
from you gurus...
1 - Completely do away with the servlet. Have a jsp file which will have all
the questions etc in variables. Use HTML to display the contents, then use
SQL to save the data.
The advantage here would be that I wouldn't need to do a lot of coding
to encode/decode string values. Since I am in the jsp file itself, I have
all the variables with me which I can directly save.
Question : Can jsp do an update to the server database? Can anybody post me
some code on how to declare variables, use them in html and access them
again in SQL queries?
I can elaborate more on my question if it is not clear.
Any help would be appreciated.
Thanks.
Raaj.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html