N
Nino
Hello,
I have several arrays of information that I want sorted through and
updated. They all depend on each other, and thus need to be updated
together. Since I use these arrays in several different JSP files, I
want to run the logic just one time and then use the arrays for
display purposes.
Thus, I have decided to build a JSP waiting page that will load the
information into the arrays, do the logic, and then redirect
accordingly. Problem is that on the waiting page, I don't know how to
approach the logic aspect of the setup. I am currently passing the
arrays via session variables between my JSPs. Is there a way to get my
session variables into a regular Java file (not a servlet call), so I
can just call methods to do the work? Is there a way to call a servlet
without redirecting? I hope I'm making sense. Here is a sample of my
code:
int uid =
java.lang.Integer.parseInt(""+session.getAttribute("user.id"));
LoadUserData lsd = new LoadUserData();
String programsList[][] = lsd.getPrograms(uid,
java.lang.Integer.parseInt(request.getParameter("ep")));
session.setAttribute("edplan.pl", programsList);
String requirementsList[][] = lsd.getRequirements(programsList);
session.setAttribute("edplan.rl", requirementsList);
String groupsList[][] = lsd.getGroups(requirementsList);
session.setAttribute("edplan.gl", groupsList);
String coursesList[][] = lsd.getCourses(requirementsList,
groupsList);
session.setAttribute("edplan.cl", coursesList);
Right here I want to do something like this:
RunAllLogic ral = new RunAllLogic();
ral.sortArrays();
sortArrays would do the work on the four arrays, save them back into
their session, and then proceed...
The problem with redirecting is that this is all built around a
"Please wait while we load your information..." page...
Hope someone can provide some insight. Feel free to ask questions if
something doesn't make sense, or I have omitted something.
Thanks in advance for your help,
Nino Skilj
I have several arrays of information that I want sorted through and
updated. They all depend on each other, and thus need to be updated
together. Since I use these arrays in several different JSP files, I
want to run the logic just one time and then use the arrays for
display purposes.
Thus, I have decided to build a JSP waiting page that will load the
information into the arrays, do the logic, and then redirect
accordingly. Problem is that on the waiting page, I don't know how to
approach the logic aspect of the setup. I am currently passing the
arrays via session variables between my JSPs. Is there a way to get my
session variables into a regular Java file (not a servlet call), so I
can just call methods to do the work? Is there a way to call a servlet
without redirecting? I hope I'm making sense. Here is a sample of my
code:
int uid =
java.lang.Integer.parseInt(""+session.getAttribute("user.id"));
LoadUserData lsd = new LoadUserData();
String programsList[][] = lsd.getPrograms(uid,
java.lang.Integer.parseInt(request.getParameter("ep")));
session.setAttribute("edplan.pl", programsList);
String requirementsList[][] = lsd.getRequirements(programsList);
session.setAttribute("edplan.rl", requirementsList);
String groupsList[][] = lsd.getGroups(requirementsList);
session.setAttribute("edplan.gl", groupsList);
String coursesList[][] = lsd.getCourses(requirementsList,
groupsList);
session.setAttribute("edplan.cl", coursesList);
Right here I want to do something like this:
RunAllLogic ral = new RunAllLogic();
ral.sortArrays();
sortArrays would do the work on the four arrays, save them back into
their session, and then proceed...
The problem with redirecting is that this is all built around a
"Please wait while we load your information..." page...
Hope someone can provide some insight. Feel free to ask questions if
something doesn't make sense, or I have omitted something.
Thanks in advance for your help,
Nino Skilj