0% found this document useful (0 votes)
16 views

Java Practical 8

This document describes a JSP application that displays values obtained from intrinsic objects like request, response and session. The application uses request object to display query string, context path and remote host. It uses response object to display character encoding, content type and locale. It also displays session ID, creation time and last access time using session object.

Uploaded by

aneeshshinde167
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Java Practical 8

This document describes a JSP application that displays values obtained from intrinsic objects like request, response and session. The application uses request object to display query string, context path and remote host. It uses response object to display character encoding, content type and locale. It also displays session ID, creation time and last access time using session object.

Uploaded by

aneeshshinde167
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

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:

You might also like