Question: Question 1 You are required to complete the given code segment. a) Given a Java class named Validate Bean.java with data members and methods.

Question 1 You are required to complete the given code segment. a)Given a Java class named Validate Bean.java with data members and methods.

Question 1 You are required to complete the given code segment. a) Given a Java class named Validate Bean.java with data members and methods. Complete the given code segment for getter method and validate() method in the ValidateBean.java. package login; public class ValidateBean { String name, password; public ValidateBean() { } public void setName(String name){this.name = name; } public String setPassword(String password) {this.password = password;} //i)get method for name and password // 2 marks public String validate(String n, String p) { //ii) implement the validate name and password // 2 marks } } (4 marks) Given a login.html page for user to insert username and password. Username Password Login Reset Figure 1. Login page. Based on the Validate Bean class defined in a), write a program segment for JSP page loginProcess.jsp that will retrieve the value input by user and produce the page as depicted in figure below. The JSP page must use JavaBean components for object creation and parameter retrieval with the combinations of JSP scripting elements to access functions available in class. (Assume username is admin and password is 123). Your username and password are Correct! Figure 2. Display page. (5 marks)

Step by Step Solution

3.47 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the completed code segment for the ValidateBean class with the getter method and the valida... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!