Application.cfc is ignored for .lc/.lucee requests

56 views
Skip to first unread message

Jesse Shaffer

unread,
Sep 24, 2015, 4:53:58 PM9/24/15
to Lucee
While experimenting with 5.0.0.64-BETA, it appears that Application.cfc is ignored for .lc/.lucee templates.  Is this correct?  I was under the assumption that the two dialects would play nicely together...

WEB-INF/web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
 
<display-name>awesomeapp</display-name>
 
<welcome-file-list>
   
<welcome-file>index.cfm</welcome-file>
   
<welcome-file>index.cfml</welcome-file>
   
<welcome-file>index.lc</welcome-file>
   
<welcome-file>index.html</welcome-file>
   
<welcome-file>index.htm</welcome-file>
   
<welcome-file>index.jsp</welcome-file>
   
<welcome-file>default.html</welcome-file>
   
<welcome-file>default.htm</welcome-file>
   
<welcome-file>default.jsp</welcome-file>
 
</welcome-file-list>
 
<servlet>
   
<description></description>
   
<display-name>CFMLServlet</display-name>
   
<servlet-name>CFMLServlet</servlet-name>
   
<servlet-class>lucee.loader.servlet.CFMLServlet</servlet-class>
 
</servlet>
 
<servlet-mapping>
   
<servlet-name>CFMLServlet</servlet-name>
   
<url-pattern>*.cfm</url-pattern>
   
<url-pattern>*.cfc</url-pattern>
   
<url-pattern>/index.cfm/*</url-pattern>
   
<url-pattern>/index.cfc/*</url-pattern>
 
</servlet-mapping>
 
<servlet>
   
<description></description>
   
<display-name>LuceeServlet</display-name>
   
<servlet-name>LuceeServlet</servlet-name>
   
<servlet-class>lucee.loader.servlet.LuceeServlet</servlet-class>
 
</servlet>
 
<servlet-mapping>
   
<servlet-name>LuceeServlet</servlet-name>
   
<url-pattern>*.lc</url-pattern>
   
<url-pattern>*.lucee</url-pattern>
   
<url-pattern>/index.lc/*</url-pattern>
   
<url-pattern>/index.lucee/*</url-pattern>
 
</servlet-mapping>
 
<servlet>
   
<description></description>
   
<display-name>RestServlet</display-name>
   
<servlet-name>RestServlet</servlet-name>
   
<servlet-class>lucee.loader.servlet.RestServlet</servlet-class>
 
</servlet>
</web-app>

index.lc
<html>
   
<head>
       
<title>Lucee Webapp</title>
   
</head>
   
<body>
        Lucee Dialect
        <:output>the time is #now()#</:output>
       
   
</body>
</html>

Application.cfc
component accessors=true output=false persistent=false {

   
public function onRequestStart() {
        writeoutput
("onrequeststart");abort;
   
}

}


Michael Sprague

unread,
Sep 24, 2015, 4:59:02 PM9/24/15
to lucee
An Application.lucee/.lc should take care of that for you. There may be a setting for .lucee/.lc to pick up Application.cfc settings but my understanding is that it's done this way to "sandbox" new Lucee features while allowing CFML to remain compatible. This might be useful if you were working on porting an app from CFML to Lucee, for example.

Warm regards,

Mike

--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/508d2536-b555-4d0e-b456-749560f0eac1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages