get url dir without the template

Posted on 2011-10-13
Last Modified: 2012-05-12
I want to get the url path.
I'm using getPageContext().getRequest().getRequestURI()

but I don't want the coldfusion template at the end.
Question by:ecpeel
    LVL 51

    Accepted Solution

    Use GetDirectoryFromPath()

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


    Author Comment

    oh... thanks _agx!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
    PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now