Implicit objects

Other topics

JSP out implicit object - simply displaying date and time.

<html>  
<body>  
<% out.print("Today is:"+java.util.Calendar.getInstance().getTime()); %>  
</body>  
</html>

request object in JSP

used to get request information such as parameter, header information, remote address, server name, server port, content type, character encoding.

Index.html

  <form action="req.jsp">  
    <input type="text" name="username">  
    <input type="submit" value="go"><br/>  
    </form>

req.jsp

<%   
String name=request.getParameter("username");  
out.print("welcome "+name);  
%>

Contributors

Topic Id: 8205

Example Ids: 26363,26426

This site is not affiliated with any of the contributors.