|
|
To recreate the error I've stripped my code down to the bare min and threw in a
test folder with a new application name. There are 5 files.
/test/Application.cfc
/test/ApplicationProxy.cfc
/test/redirect.cfm
/test/pub/Application.cfc
/test/pub/target.cfm
The first time I run /test/redirect.cfm it works fine. If I update
/test/pub/target.cfm, and browse to /test/redirect.cfm, I don't see the
changes (CF didn't recompile /test/pub/target.cfm?).
If I update /test/redirect.cfm (maybe throw in a comment) and browse to it,
it will throw the fileAccess error. If I browse to the /test/pub/target.cfm
file, the page displays properly and now I can browse to /test/redirect.cfm
again without error.
Now if I update /test/pub/target.cfm and browse to /text/redirect.cfm, I also
get the error. Before I just wasn't getting the updated target page, but now
it errors.
So that's how I recreated the error. Here's the real problem... After I get
the redirect working (by running the target page manually) it will end up
breaking again after an unknown amount of time (I usually find out it's broken
the next morning).
P.S. - I've noticed the first time I get the error it ends in "write":
access denied (java.io.FilePermission
C:\Coldfusion8\wwwroot\WEB-INF\cfclasses\cftarget2ecfm168784208.class write)
Subsequent errors end in "read":
access denied (java.io.FilePermission
C:\Coldfusion8\wwwroot\WEB-INF\cfclasses\cftarget2ecfm168784208.class read)
_____________________________________________
/test/Application.cfc:
<cfcomponent>
<cfscript>
this.name = "TestApplication";
this.applicationTimeout = createTimeSpan(0,4,0,0);
this.sessionManagement = true;
this.sessionTimeout = CreateTimeSpan(0,2,0,0);
</cfscript>
<cffunction name="onError" output="true">
<cfargument name="exception" required="true" />
<cfargument name="eventName" type="String" required="true" />
<cfdump var="#arguments.exception#" label="ERROR Variables">
</cffunction>
</cfcomponent>
_____________________________________________
/test/ApplicationProxy.cfc
<cfcomponent extends="Application" output="No" />
_____________________________________________
/test/redirect.cfm:
<cfset GetPageContext().forward("pub/target.cfm")>
_____________________________________________
/test/pub/Application.cfc:
<cfcomponent extends="ApplicationProxy">
<cffunction name="onRequestStart">
<cfargument name="theRequestedPage" required="true">
<cfset super.onRequestStart(arguments.theRequestedPage)>
</cffunction>
</cfcomponent>
_____________________________________________
/test/pub/target.cfm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>target.cfm</title>
</head>
<body>
<cfdump var="#cgi#">
</body>
</html>
|
|