Using CFHTTP to access a page that executies CFQUERY's

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Using CFHTTP to access a page that executies CFQUERY's

    I have a page called print.cfm. It's purpose is to print out, to screen, all
    pages of a multi-page application form. Throughout print.cfm I have CFQUERY
    calls to the database to retrieve the content that the user has submitted to
    the database. I am trying to access this page using a CFHTTP call and write
    it's contents to an HTML file. All works well, EXCEPT I don't get any of the
    content from the database - the questions appear but the answers come up blank.
    If I access my print.cfm page directly through my browser I see the questions
    and answers. Is it possible to use CFHTTP to access the contents of a page
    that is dynamically outputting content from queries? Here is my CFHTTP call:

    <cfhttp
    URL="http://192.168.0.10/test/proposal/print.cfm?lang=#lang#&type=pdf"
    port="80"
    timeout="20000"
    method="Get"
    file="pp#session.orgid#.htm"
    path="#application.directory_path#\proposal\print\ html_files"
    resolveurl="Yes"
    redirect="Yes">

    horne8221 Guest

  2. Similar Questions and Discussions

    1. New Page Access
      Is there a way to prevent users from creating a new page? Even wth allof the options unchecked in the Role Settings dialog box, a writer in that...
    2. CFHTTP get method on SSL page
      Hi All, I'm using cfthttp tag to get xml data from a secure link. This tag is works fine with the regular page (http page) but it doesn't work with...
    3. Restrict page access to parent page only (not by permissions)
      I wish to restrict access of a pop-up page to parent page only. i.e. - if a request for "popup.cfm" comes from anywhere except "launch.cfm" then...
    4. Controlling Page Access in .aspx page
      I am building some .NET classes and pages that will be part of an existing classic ASP app. The ASP app uses cookies to store login information for...
    5. an "access denied" page for unauthorised page access
      I would like to show an "access denied" page when an authenticated user tries to access a page for which they are not authorised (role-based). ...
  3. #2

    Default Re: Using CFHTTP to access a page that executiesCFQUERY's

    For anyone that runs into a similiar problem... I did eventually figure this
    out. My print.cfm page, that I was calling through CFHTTP, had several queries
    on it that were querying the database based on a SESSION variable (i.e. WHERE
    orgID = #session.orgid#). When using CFHTTP, the session is lost (CFHTTP
    creates it's own session). So, my fix was as simple as passing in the orgID
    through the CFHTTP call instead of querying based on the session value.

    horne8221 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139