Techknow Study

display the given input

11:29:00 PM vikas 0 Comments Category :


WAP to display the given input

                    `                    SHOWDATA.jsp

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>JSP page</title>
</head>
<body>
<h1>
WAP to display the given input</h1>

<%!String pname1,pname2;%>
<% pname1=(String)request.getParameter("pname1");
pname2=(String)request.getParameter("pname2");
%>

company is<%=(String)session.getAttribute("cname1")%>
with following products<%=pname1%><%=pname2%>
Owner of the comp-any is:<%=(String)session.getAttribute("oname1")%>
</body>
</html>




                                                 SAVEDATA.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jsp page</title>
</head>
<body>

<h1>HELLO WORLD!</h1>
<form method="post" action="SAVEDATA.jsp">
company Name<input type="text" name="cname"/>
owner name<input type="text" name="oname"/>
<input type="submit" value="ok"/>

</form>
</body>







                                                   INDEX.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>jsp page</title>
</head>
<body>
<h1>
WAP to display the given input</h1>
<form method="post" action="SAVEDATA.jsp">
company Name<input type="text" name="cname"/>
owner name<input type="text" name="oname"/>
<input type="submit" value="ok"/>
</form>
</body>
</html>



Output-
Form Window

 


Product Window
 

RELATED POSTS

0 comments