Answered step by step
Verified Expert Solution
Question
1 Approved Answer
d) Assuming that the following vecPhone is stored in a session from a JSP file, as showi in the following code: // Program 2.5 -
d) Assuming that the following vecPhone is stored in a session from a JSP file, as showi in the following code: // Program 2.5 - vector.jsp Vector vecPhone = new Vector(); WNPO vecPhone.add("Apple"); vecPhone.add("Samsung"); vecPhone.add("Oppo"); vecPhone.add("Vivo"); //add vecPhone into session session.setAttribute ("phone_vector", vecPhone); 14 15 //display in view.jsp
click here to view in another page (through the use of session)
16 17 Write a segment of code for view.jsp that will extract the vector object (vecPhone) from the session and display the content of the vector using JSP Expression as in Figure 2a. (7 marks) Index Phone Brand 1 Apple 2 Samsung 3 Oppo 4 Vivo Figure 2a d) Assuming that the following vecPhone is stored in a session from a JSP file, as showi in the following code: // Program 2.5 - vector.jsp Vector vecPhone = new Vector(); WNPO vecPhone.add("Apple"); vecPhone.add("Samsung"); vecPhone.add("Oppo"); vecPhone.add("Vivo"); //add vecPhone into session session.setAttribute ("phone_vector", vecPhone); 14 15 //display in view.jspclick here to view in another page (through the use of session)
16 17 Write a segment of code for view.jsp that will extract the vector object (vecPhone) from the session and display the content of the vector using JSP Expression as in Figure 2a. (7 marks) Index Phone Brand 1 Apple 2 Samsung 3 Oppo 4 Vivo Figure 2aStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started