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:
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...
-
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...
-
Refer to the data provided for Powder, Inc. in E6-15. In E6-15 Powder, Inc. sells an Xpert snowboard that is popular with snowboard enthusiasts. The following information shows Powder's purchases and...
-
What is EDI? Why are companies using it?
-
Use the financial data for Randa Merchandising, Inc., in Exercise 13-13 to prepare its income statement for calendar-year 2017. (Ignore the earnings per share section.) Data From Exercise 13.13 In...
-
On June 10, Tuzun Company purchased $8,000 of merchandise from Epps Company, FOB shipping point, terms 2/10, n/30. Tuzun pays the freight costs of $400 on June 11. Damaged goods totaling $300 are...
-
(a) Consider the recurrence below defined for n 0. 3 T(n): if n = 0 7T (n - 1) +12 if n > 0 Give a closed-form solution to the recurrence. You only have to give the solution. You do not need to show...
-
The carrying amount of ABZ Inc. equity at January 1, 2018 was: Equity CU 1,200,000 Share Capital compromising 120,000 shares of CU 10 par value each Share premium 4,800,000 Share Option Reserve...
-
A mutual fund has $40 million in assets at the beginning of the year and 2 million shares outstanding throughout the year. Throughout the year assets grow at 10% annually. The fund imposes a 12b-1...
-
ABC Company is considering a new project. The project is expected to generate annual sales of $91,079, variable costs of $26,515, and fixed costs of $12,494. The depreciation expense each year is...
-
Taking into account that on the electoral roll there are 7,450,200 people with the capacity to vote, and that only 4,830,400 voters voted, what was the percentage of citizens who did not vote?
-
Why have reusable launch vehicles generally been more expensive than expendable ones?
-
Find the values of a where the tangent line to the graph of f(x) 6x + 4. y = - Give exact answers (not decimal approximations). (Tip: To enter a, type either sqrt(a) or a^(1/2).) The greater solution...
-
If the U.S. was an age-irrelevant society, would there be a better opportunity for optimistic aging? Explain
-
Revolutions need space. Explain why this is the case, grounding your response in the example of the Arab Spring. 500 words
-
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...
-
Prove that the boosted right-handed spinor \(\psi_{\mathrm{R}}(\boldsymbol{p})\) is related to the corresponding rest spinor by Eq. (14.21).
-
Use the \(\gamma\)-matrices in the Weyl representation to show that the Dirac equation (14.31) is equivalent to Eq. (14.25). Data from Eq. 14.31 Data from Eq. 14.25 (y"Pu-m)(p) = (iy" - m)(p) = 0
-
Prove the identity \((\sigma \cdot \boldsymbol{p})^{2}=\mathrm{I}^{(2)} p^{2}\), where \(\sigma=\left(\sigma_{1}, \sigma_{2}, \sigma_{3} ight)\) are the Pauli matrices, \(\boldsymbol{p}\) is the...
Study smarter with the SolutionInn App