0% found this document useful (0 votes)
6 views3 pages

Program 3

The document outlines a program to calculate a student's percentage of marks using JSP. It includes an algorithm for creating an HTML form and a JSP file to process the input. The coding section provides the HTML and JSP code needed to implement the program, displaying the total marks and percentage based on user input.

Uploaded by

Vidhya Elango
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Program 3

The document outlines a program to calculate a student's percentage of marks using JSP. It includes an algorithm for creating an HTML form and a JSP file to process the input. The coding section provides the HTML and JSP code needed to implement the program, displaying the total marks and percentage based on user input.

Uploaded by

Vidhya Elango
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

EX.

NO:3 CALCULATING THE PERCENTAGE OF MARKS OF A STUDENT USING


JSP
AIM:
To Develop a program for calculating the percentage of marks of a student using JSP.
ALGORITHM:
1. Start the process
2. Create an HTML file named student.html.
3. Create a JSP file named stud.jsp.
4. Place student.html and stud.jsp in project’s web application directory.
5. Start a Java EE-compatible web server.
6. Run the program in localhost.
7. Stop the process
CODING:
student.html

<html>

<head>

<body>

<title>STUDENT MARK STATEMENT</title>

</head>

<center><h1>PADMAVANI ARTS AND SCIENCE COLLEGE FOR WOMEN</h1><br>

<h2>DEPARTMENT OF COMPUTER SCIENCE</h2></br></center>

<p>Enter Marks</p>

<form action="stud.jsp" method="GET">

<table border=1 bgcolor=#fbaaff><tr><td>

<tr><td>REG NO<input type="text" name="reg no"></td></tr><br>

<tr><td>JAVA<input type="text" name="java"></td></tr><br>

<tr><td>PYTHON<input type="text" name="python"></td></tr><br>

<tr><td>C<input type="text" name="c"></td></tr><br>

<tr><td><input type="Submit" value="submit"></td></tr>


</form>

</body>

</html>

stud.jsp

<html>
<head>
<body>
<title>STUDENT MARK STATEMENT</title>
</head>
<center><h1>PADMAVANI ARTS AND SCIENCE COLLEGE FOR WOMEN</h1><br>
<h2>DEPARTMENT OF COMPUTER SCIENCE</h2></br></center>
<%
int rno=Integer.parseInt(request.getParameter("reg no"));
int m1=Integer.parseInt(request.getParameter("java"));
int m2=Integer.parseInt(request.getParameter("python"));
int m3=Integer.parseInt(request.getParameter("c"));
int tot=m1+m2+m3;
double avg=tot/3;
%>
<h3><center>STUDENTS DETAILS<center></h3>
<h2>
TOTAL:<%=tot%><br>
PERCENTAGE:<%=avg%>
</h2>
</body>
</html>
OUTPUT:

You might also like