i’m building an application that generates surveys, the code is going to be written in Java.
Once the user is done creating their survey, they must have a link to share with other people who will fill this survey.
I don’t have a clear idea how to implement this, like, should i create a new web page for each survey and give the user its url which will be forwarded to other users who will fill this survey or there is another (smarter) mechanism to do that? if so, any idea on how to implement the solution?
i’m building an application that generates surveys, the code is going to be written
Share
I suppose you’re saving surveys somewhere, be it database or a file.
So the easiest way is to give a user a link like this:
www.mysurvey.com/survey?id=surveyID, wheresurveyIdis a primary key of survey’s main record in the DB, or a filename if you use files.That obviously leads us to security problem: if user is a smart one, he or she can get other surveys guessing the id, or, worse yet, retrieve system files playing with filename. But for a simple example this will work, and this will get you started.