hyperlink value passing from one jsp to another jsp

Program: Input.jsp

 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Javadomain.in</title>
</head>
<body>
<a href="http://localhost:17433/My_Workouts/output.jsp?q=Javadomain+Welcomes+you">Click</a>
</body>
</html>

 

Output.jsp:

 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Javadomain.in</title>
</head>
<body>
<%String input = request.getParameter("q");
out.println(input);%>
</body>
</html>

 

Output: hyperlink value passing from jsp to another jsp

415 total views, 1 views today

Leave a Reply

Your email address will not be published. Required fields are marked *