If the issue is that it appears to be looking in the wrong place for the
file, you could perhaps try:

jspPage = ExpandPath( './testvars.jsp?name=Robi%20Sen' );
GetPageContext().include( jspPage );

And if that doesn't work out:

currentDir = GetDirectoryFromPath( GetCurrentTemplatePath() );
jspPage = currentDir &  './testvars.jsp?name=Robi%20Sen' ;
GetPageContext().include( jspPage );

Seems rather odd though for sure.

Dominic

On 29 December 2010 03:18, Phil Scala <[email protected]> wrote:

>
> All, maybe someone can help me out...
>
> I opened a thread on my hosting providers forum for a problem I am having
> with calling a JSP from my CFM page, the thread is located here:
>
> http://forum.hostek.com/showthread.php?414-GetPageContext-include-method-causing-a-security-exception-in-hosted-environment&p=687
>
> I an a noob with Coldfusion and I am trying to call a jsp page from a cold
> fusion page (CFM). On my local development environment the following code
> works fine (taken from Adobe documentation)
>
> Code:
> <cfscript>
>  GetPageContext().include('testvars.jsp?name=Robi%20Sen');
> </cfscript>
> where testvars.jsp is in the same directory as the CFM file.
>
> When i upload to my hosting provider hostek, i get the following error:
>
>
> Security: The requested template has been denied access to
> C:\ColdFusion9\wwwroot\Mobile\testvars.jsp.
>
> I do know that the pages are on the D: drive and not on the C:\ drive. So
> the reference to the C:\ColdFusion... path has me scratching my head....
>
> I can directly access the JSP file and for now (i.e. from browser hit the
> jsp page), so I have placed it in an IFRAME as a short term hack.
>
>
> From the java documentation for the include method i have read:
>
> If the relativeUrlPath begins with a "/" then the URL specified is
> calculated relative to the DOCROOT of the ServletContext for this JSP. If
> the path does not begin with a "/" then the URL specified is calculated
> relative to the URL of the request that was mapped to the calling JSP.
>
> the host does not have many ColdFusion settings to change / tweak or
> view...so any debugging pointers or assistance will be welcomed
>
> Phil
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340301
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to