404 woes

Hi, I have recently move several applications from ACF to Lucee, all is
well, except for getting 404 pages to work for missing cfm templates

Exception handling works fine.

I’m running IIS 8 on 2k12, tomcat 8, latest lucee
Custom error pages are set in IIS for pages other than .cfm and this works
fine, but when I specify the 404.cfm (or 404.htm - i tried both) in the
“Missing Template Error (404)” field on Lucee web admin, it doesn’t appear
to work.
I’ve tried paths relative to the root, full absolute drive paths both with
forward and back slashes (restarting tomcat with each change), nothing
seems to make a difference. There’s nothing in application.cfm /
application.cfc to override the web content settings.

If a missing template is called, it always falls back to the general error
template.

Has anyone got any hints or tips, i’m pulling my hair out!

Thanks

Not yet, the applications I am moving are a mix or .cfc and .cfm
(imherited) and I was hoping for a solution that would work on them all.
What page does that actually return though? I need something that is
friendly for the user.
Can I use that and “include” the custom 404 page before the return true?On Friday, June 19, 2015 at 12:29:35 PM UTC+1, Konstantinos Liakos wrote:

Have you tried this in Application.cfc?

public boolean function onMissingTemplate(required string TargetPage) {
header statusCode=404;
echo(“Page not found”);
return true;
}

On Friday, 19 June 2015 10:46:44 UTC+3, Tim Welford wrote:

Hi, I have recently move several applications from ACF to Lucee, all is
well, except for getting 404 pages to work for missing cfm templates

Exception handling works fine.

I’m running IIS 8 on 2k12, tomcat 8, latest lucee
Custom error pages are set in IIS for pages other than .cfm and this
works fine, but when I specify the 404.cfm (or 404.htm - i tried both) in
the “Missing Template Error (404)” field on Lucee web admin, it doesn’t
appear to work.
I’ve tried paths relative to the root, full absolute drive paths both
with forward and back slashes (restarting tomcat with each change), nothing
seems to make a difference. There’s nothing in application.cfm /
application.cfc to override the web content settings.

If a missing template is called, it always falls back to the general
error template.

Has anyone got any hints or tips, i’m pulling my hair out!

Thanks

Have you tried this in Application.cfc?

public boolean function onMissingTemplate(required string TargetPage) {
header statusCode=404;
echo(“Page not found”);
return true;
}On Friday, 19 June 2015 10:46:44 UTC+3, Tim Welford wrote:

Hi, I have recently move several applications from ACF to Lucee, all is
well, except for getting 404 pages to work for missing cfm templates

Exception handling works fine.

I’m running IIS 8 on 2k12, tomcat 8, latest lucee
Custom error pages are set in IIS for pages other than .cfm and this works
fine, but when I specify the 404.cfm (or 404.htm - i tried both) in the
“Missing Template Error (404)” field on Lucee web admin, it doesn’t appear
to work.
I’ve tried paths relative to the root, full absolute drive paths both with
forward and back slashes (restarting tomcat with each change), nothing
seems to make a difference. There’s nothing in application.cfm /
application.cfc to override the web content settings.

If a missing template is called, it always falls back to the general error
template.

Has anyone got any hints or tips, i’m pulling my hair out!

Thanks

Works on Application.cfm also, and yes you can include a custom cfm
template.On Jun 19, 2015 3:46 PM, “Tim Welford” <@Tim_Welford> wrote:

Not yet, the applications I am moving are a mix or .cfc and .cfm
(imherited) and I was hoping for a solution that would work on them all.
What page does that actually return though? I need something that is
friendly for the user.
Can I use that and “include” the custom 404 page before the return true?

On Friday, June 19, 2015 at 12:29:35 PM UTC+1, Konstantinos Liakos wrote:

Have you tried this in Application.cfc?

public boolean function onMissingTemplate(required string TargetPage) {
header statusCode=404;
echo(“Page not found”);
return true;
}

On Friday, 19 June 2015 10:46:44 UTC+3, Tim Welford wrote:

Hi, I have recently move several applications from ACF to Lucee, all is
well, except for getting 404 pages to work for missing cfm templates

Exception handling works fine.

I’m running IIS 8 on 2k12, tomcat 8, latest lucee
Custom error pages are set in IIS for pages other than .cfm and this
works fine, but when I specify the 404.cfm (or 404.htm - i tried both) in
the “Missing Template Error (404)” field on Lucee web admin, it doesn’t
appear to work.
I’ve tried paths relative to the root, full absolute drive paths both
with forward and back slashes (restarting tomcat with each change), nothing
seems to make a difference. There’s nothing in application.cfm /
application.cfc to override the web content settings.

If a missing template is called, it always falls back to the general
error template.

Has anyone got any hints or tips, i’m pulling my hair out!

Thanks


You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/Uw_vIj_WBmA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/5adfa514-8e24-480b-87df-4e5b2cc1dc43%40googlegroups.com
https://groups.google.com/d/msgid/lucee/5adfa514-8e24-480b-87df-4e5b2cc1dc43%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.