Thread: difference between ${pageContext.request.contextPath} and ${request.contextPath}

Forum : Java Server Pages (Jsp)   2 Jan, 2018 01:22
User Image
MaheswaraD

Newbie

Joined: 27 Jun, 2017

Points: 100

Threads: 7

Posts: 10

Answer Icon difference between ${pageContext.request.contextPath} and ${request.contextPath}

| Quote Date : 2 Jan, 2018    Views:1487    

what does these expressions exactly do in jsp page ${pageContext.request.contextPath} and

${request.contextPath}

Comments

User Image
Sriman

Member

Joined : 15 Jul, 2016

Points : 1000

Threads: 645

Posts: 201

Answer IconRe: difference between ${pageContext.request.contextPath} and ${request.contextPath}

Reply Date : 3 Jan, 2018

<%=request.getContextPath()%> is an implicit variable. instead of using an implicit object of jsp we can use EL equivalent as ${pageContext.request.contextPath} to get the Context Path of the application

Load More

No More Comments