Question: I have code which does `<%@include file = "/webpages/includeFiles/header.jsp" %>` which works fine.

However i want use it with `request.getContextPath()`

Something like `<%@include file = "request.getContextPath ()/webpages/includeFiles/header.jsp" %>` 

I get a compilation error. 

How can i achieve it ?

Answer: 
You cannot include dynamic valuse in `<%@include file = "">`. 

Use the standard action which accepts dynamic values `<jsp:include page="<%=request.getContextPath()%>/firstPage.jsp"></jsp:include>`
Instead of using static include, try using dynamic include

```
<jsp:include page='<%= request.getContentType()/webpages/includeFiles/header.jsp %>' />

```

I have not tested, try manipulating bit if not works.

You can take a look here: [Include file from dynamic property value](https://stackoverflow.com/questions/4988086/include-file-from-dynamic-property-value)