1600 PMP mock questions 1400 CAPM mock questions 800 SCJP 6 mock questions 600 OCAJP 7 mock questions 590 OCPJP 7 mock questions 556 SCWCD 5 mock questions 500 OCEJWCD 6 mock questions pdfDownload (java,struts, hibernet etc)

JSP Tutorials

How to retrive/read the values entered in HTML/JSP and data posted to a JSP ?

Step by Step

step 1.
Your html/jsp code : page1.jsp or page1.html
-------------------------------------------
<html>
<head>
<title>Name Test Form</title>
</head>
<body>
<form method="post" action="page2.jsp">
<p><b>Enter Your Name: </b><input type="text" name="name"><br>
<input type="submit" value="Submit">

</form>

</body>
</html>

In the page2.jsp you want to retrive the value entered in page1.jsp

step 2.
Your jsp code : page2.jsp
-----------------------------------------
<%
String name=request.getParameter("name");
%>

<html>
<head>
<title>Display result</title>
</head>
<body>
Name is : <%=name%>

</body>
</html>
---------------------------------------------
<%=name%> is expression for display data in JSP.

Reviews and Comments


PMP, CAPM, PMI is a registered certification mark of the Project Management Institute, Inc

Copyright © www.techfaq360.com 2016


About US | Contact US | Privacy Policy | Terms and Conditions  | Website disclaimer  | Cancellation and Refund Policy  | Shipping & Delivery Policy