Practical 8
Aim: Develop a simple JSP application to display values obtained from the
use of Intrinsic objects of various types.
Code:
Index.jsp
<%--
Document : index
Created on : Feb 14, 2024, 1:10:40 PM
Author : Machine014
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-
8">
<title>JSP Page</title>
</head>
<body>
<h1>Use of Intrinsic Objects in JSP</h1>
<h1> Request Object</h1>
Query String<%=request.getQueryString()%><br>
Context Path<%=request.getContextPath()%><br>
Remote Host<%=request.getRemoteHost()%><br>
<h1> Respond Object</h1>
Character Encoding Type <%=request.getCharacterEncoding()
%><br>
Content Type<%=request.getContentType()%><br>
Locale<%=request.getLocale()%><br>
<h1> Session Object</h1>
ID <%=session.getId()%><br>
creation Time <%=new java.util.Date(session.getCreationTime())
%><br>
Last Access Time <%=new
java.util.Date(session.getLastAccessedTime())%><br>
</body>
</html>
Output: