hyperlink value passing from one jsp to another jsp

Program: Input.jsp

 

[html]<%@ 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>[/html]

 

Output.jsp:

 

[html]<%@ 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>[/html]

 

Output: hyperlink value passing from jsp to another jsp

Leave a Reply