Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

5. To create the random pages follow step 3 in the first example. After the first is created (random.jsp), save it as random1.jsp, random2.jsp, and again as randomMeasure.jsp. The code in your random pages should look like this:

Code Block
titlerandom1random.jsp
borderStylesolid
<%@include file="include_questionnaire.jsp"%>

<% /**  random.jsp will randomize pages 1-3 **/
if (redirectRandomOrderTo("Users", "RandomPageOrder", new String[]{"page1.jsp", "page2.jsp", "page3.jsp", " })) {
} else {
redirectTo("randomMeasure.jsp");
}
%>

<%@include file="survey_end.jsp"%>
Code Block
titlerandom1.jsp
borderStylesolid

<%@include file="include_questionnaire.jsp"%>

<% /** random1.jsp will randomize pages 4-6 **/
if (redirectRandomOrderTo("Users", "RandomPageOrder1", new String[]{"page4.jsp", "page5.jsp", "page6.jsp", " })) {
} else {
redirectTo("randomMeasure.jsp");
}
%>

<%@include file="survey_end.jsp"%>
Code Block
titlerandom2.jsp
borderStylesolid

<%@include file="include_questionnaire.jsp"%>

<% /**  random2.jsp will randomize pages 7-9 **/
if (redirectRandomOrderTo("Users", "RandomPageOrder2", new String[]{"page7.jsp", "page8.jsp", "page9.jsp", " })) {
} else {
redirectTo("randomMeasure.jsp");
}
%>

<%@include file="survey_end.jsp"%>
Code Block
titlerandomMeasure.jsp
borderStylesolid

<%@include file="include_questionnaire.jsp"%>

<% /** randomMeasure.jsp will randomize measures A, B, and C **/
if (redirectRandomOrderTo("Users", "randomMeasure", new 
String[]{"random.jsp", "random1.jsp", "random2.jsp", " })) {
} else {
redirectTo("doneWithSurvey.jsp");
}
%>

<%@include file="survey_end.jsp"%>