get url dir without the template

I want to get the url path.
I'm using getPageContext().getRequest().getRequestURI()

but I don't want the coldfusion template at the end.
 
thanks
ecpeelAsked:
Who is Participating?
 
_agx_Connect With a Mentor Commented:
Use GetDirectoryFromPath()

<cfset fullPath = getPageContext().getRequest().getRequestURI()>
<cfset pathWithoutFileName = GetDirectoryFromPath(fullPath) />

0
 
ecpeelAuthor Commented:
oh... thanks _agx!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.