Question 1 You are required to complete the given code segment. a) Given a Java class...
Fantastic news! We've Found the answer you've been seeking!
Question:
![image](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/01/65b7541a5ce8a_43465b7541a2aacb.jpg)
![image](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/01/65b7541ab7ebc_43465b7541a95609.jpg)
Transcribed Image Text:
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) 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)
Expert Answer:
Answer rating: 100% (QA)
Heres the completed code segment for the ValidateBean class with the getter method and the valida... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Consider the following multithreaded pseudocode for transposing an n à n matrix A in place: Analyze the work, span, and parallelism of this algorithm. P-TRANSPOSE(A) 1 n = A.rows 2 parallel...
-
Match the description in Column I with its equation in Column II. I (a) Slope -0.5, b = -2 (b) x-intercept (4, 0), y-intercept (0, 2) (c) Passes through (4, -2) and (0, 0) 1 (d) m = passes through...
-
How do you measure a company's future financial health and how is it linked with Interest Rate Risk, Economic Risk, Credit Risk, and Operational Risk? What is the difference between Lower Growth...
-
Question 2: Consider the market for Florida oranges. The demand for Florida oranges is given by the inverse demand function p = 70-2Q The market cost function for firms that sell Florida oranges is...
-
Powder, Inc. sells an Xpert snowboard that is popular with snowboard enthusiasts. The following information shows Powder's purchases and sales of Xpert snowboards during November: Instructions (a)...
-
Kourtnie and Kayla are sisters who are taking the same classes this semester: DRE 098, CHM 130 / 130A, and ACA 122. If Kourtnie earns B in DRE 098, an A in CHM 130 / 130A, and an A in ACA 122, then...
-
An atlas is a compendium of geographic, economic, and social information that describes one or more geographic regions. Atlases are used by the sales and marketing functions of businesses, local...
-
The flowing jobs are waiting to be processed at Rick Carlsons machine center. Carlsons machine center has a relatively long backlog and sets fresh schedules every 2 weeks, which do not disturb...
-
The Cheyenne Hotel in Big Sky, Montana, has accumulated records of the total electrical costs of the hotel and the number of occupancy-days over the last year . An occupancy-day represents a room...
-
KIC Inc. plans to issue $5 million of bonds with a coupon rate of 8 percent and 30 years to maturity. The coupons are paid semiannually and the current market interest rate on these bonds is 7...
-
Due to erractic sales of its sole product - a high-capacity for laptop computers - PEM Ltd has been experiencing difflculty for some time. The comppany's profit and loss account for the most recent...
-
The residents of the town of Stewart are well-known coffee drinkers. Dunkin Donuts and Starbucks stores supply the residents with over 100,000 cups of hot coffee per week. Recently, coffee drinkers...
-
Read through the following case study and analyse it by addressing the question that follows. Case study: Adriana Adriana runs a very busy multi-sports coaching company that provides after-school...
-
Assuming that you were invited to one of your best friends' wedding. Therefore, you decided to purchase a special product or service as a gift for this important event. Based on this scenario, you...
-
The Department of Commerce, through the Economic Development Administration (EDA), is seeking information to inform the planning and design of the Regional Technology and Innovation Hub (Tech Hubs)...
-
In frontline management, it is essential to manage time effectively. In the table below, list 3 time-management principles that are relevant to a frontline manager's own work and provide 3 examples...
-
a-1. Determine the effective annual yield of a three-month bill selling at $9,782. (Do not round intermediate calculations. Round your answer to 2 decimal places.) Effective annual yield % a-2....
-
Using the parallel-axis theorem, determine the product of inertia of the area shown with respect to the centroidal x and y axes. 6 in. 9 in. 9 in- 4.5 in. in. 4.5 in.
-
If Charles, a 16-year-old child model, earns $50,000 a year and is completely self supporting even though he lives with his parents, can his parents claim him as a dependent? Why or why not?...
-
Teresa is a civil engineer who uses her automobile for business. Teresa drove her automobile a total of 21,732 miles during 2012, of which 95 percent was business mileage. The actual cost of...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
Given the following project (all times are in days): LO6 Act- Prede- Normal Normal Crash Crash ivity cessor Time Cost Time Cost a 5 $50 3 $150 b 4 40 2 200 c b 7 70 6 160 d a, c 2 20 1 50 e a, c 3...
-
Given the project shown in Figure 5-10 of Chapter 5, assume that a facility used by activities c and d is scarce. To which activity would you assign the facility first, given the following rules: LO6...
-
Given the following project to landscape a new building site: Activity LO6 Immediate Duration Resource Activity Predecessor (days) Used A 2 X, Y B A 2X C A 3X D B, C 4 X, Y E D 3 W, X F D 1 W, X, Y...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App