This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
I'm trying to teach myself several new Java centered technologies (due to my new position). However, my co-workers are under deadline so I'm on my own to get up to speed. I've been creating a test application to become more familiar with JSP and Servlets. This is what brings me here.
I have a SelectBox (I've read that it is NOT to be called a combobox :), with students names. Below several Text boxes, etc is a table which displays the students class schedule (built when form is submitted). The table is being created through the use of JSP and session variables. What I'd like is to determine which student is currently selected in the SelectBox and use that value in my JSP code that builds the table. Ultimately what I want is that when the selected student changes the table is rebuilt, displaying the newly selected students schedule.
Code snippets below
//I do something along these lines
SchoolSchedule allSchedule = Session.getAttribute("schoolSchedule");
SchoolClass myclass = allSchedule.getClass(studentname); //This is currently hardcoded. Need a way to base this off the selectBoxes value
Then I loop through myclasses building the <TABLE> as needed
1) How do I simply display selected value(ie 'newStudent2') on the screen? (I've tried 'request.getAttribute("studentCB")' but just get null)
2) How can I build a <TABLE> to be displayed within my 'onChange' function?
knowledge is the difference between drudgery and strategic action -- tiny ad