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

Forum : Java Server Pages (Jsp)   01-1-2018 08:22:54 PM
User Image
MaheswaraD

Newbie

Joined: Jun 27, 2017

Points: 100

Threads: 7

Posts: 10

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

| Quote Date : Jan 1, 2018    Views:1120    

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

${request.contextPath}

Comments

User Image
Sriman

Member

Joined : Jul 15, 2016

Points : 570

Threads: 642

Posts: 184

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

Reply Date : Jan 3, 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