Why not run it via the mapping?

<cferror type="request"
         template="/myapp/err/global.cfm"
         mailto="[EMAIL PROTECTED]">

> -----Original Message-----
> From: Jim McAtee [mailto:[EMAIL PROTECTED]
> Sent: 17 February 2004 22:11
> To: CF-Talk
> Subject: CF5 Error Handler Form
>
>
> In a particular application I'd like to have a global error
> handler, ideally set within application.cfm.  My directory
> structure is something like the following, with
> application.cfm located in /myapp/:
>
> /
> /myapp/
> /myapp/subdirectory1/
> /myapp/subdirectory2/
> /myapp/err/
>
> <cferror type="request"
>          template="err/global.cfm"
>          mailto="[EMAIL PROTECTED]">
>
>
> If I use the above statement in application.cfm then it
> appears to work fine throughout the entire application,
> including all subdirectories, so I can conclude that the path
> to the cferror template is set relative to application.cfm
> itself.  Now, if I want to place a form in the error handling
> template, I'm having trouble getting to the form handler
> (located in the same directory as global.cfm).  At this point
> a relative path in the form action is relative to the
> template in which the error was thrown rather than to the
> error handler.
>
> <form action="" method="post">
> ...
> </form>
>
> Short of hard-coding the path to the form's action page, is
> there any way to deal with this?  This is mostly for the
> purpose of application portability, as I'd like to avoid hard
> coding paths.  And, of course, you can't do a <cfoutput> in
> the form handler to output a path that might be set in a
> configuration variable.
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to