Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello This question is related to java I hope to answer it using keyboard, and n

ID: 3583656 • Letter: H

Question

Hello

This question is related to java

I hope to answer it using keyboard, and not by handwriting

Thank you..

Main.html

<!DOCTYPE html>

<html>

<body>

<h2>Enter Your Information</h2>

<form action="main.jsp">

Full name:<br>

<input type="text" name="fullname">

<br>

Mark:<br>

<input type="text" name="mark">

<br><br>

<input type="submit" value="Submit">

</form>

</body>

</html>

Q3. Given the XHTML page "Main. html", Write the corresponding JSP page that displays congratulation message if grade 60 and sorry message if grade

Explanation / Answer

main.jsp

<%
name = request.getParameter("name");
mark = Integer.parseInt(request.getParameter("mark"));

if(mark>100)
   {
   out.println("Error, Mark should not exceed 100");
   return 0;
   }

if(mark>60)
   {
   out.println("Congratulations you have passed, "+name);
   return 0;
   }
out.println("Sorry you have not passed,"+name);

%>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote