When we use the request object to get the data submitted by the form, this is a bit like the request Fetch data method in the ASP.
The value of the recycle is determined in the form field
The primary use of objects is the requirement that the value user provide a form submission. For example, this HTML page a.jsp:
<%
String bUrl = Response.encodeurl ("b.jsp");
%>
<%--Presentation--%>
<form method= "POST" action= "<%= bUrl%>" >
What is your Favourite kind of eggs?
<input type= "text" name= "FAVEGSS" size= ">
<br> <input type="
submit "value=" Submit ">
<input type= "reset" value= "reset" >
</form>
<% String aurl = Response.encodeurl ("a.jsp");%> <% String Faveggs = Request.getparameter ("Eggs")
;
if (Faveggs!= null) && (Faveggs.trim (). Length () = 0)) Faveggs = null; %> <%--Presentation--%> <% if (Faveggs = null) {%> No eggs supplied! <a href= "<%= aurl%>" &G T
Try again</a> <%} else if (Faveggs.equals ("green")) {%> Of course-we have <%= Faveggs%> eggs!
It ' s one of our favourites too. <%} else {%> We do not have <%= Faveggs%>. Eggs} <%;