Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fetch message from another page

Status
Not open for further replies.

cleanair4me47

Technical User
Mar 18, 2010
1
US
I am using ColdFusion 8 and I would like to fetch a JSP Hello World message in ColdFusion. I tried both attempts below where the hello.jsp is a simple Hello World message.

Code:
<cfscript>
GetPageContext().include("[URL unfurl="true"]http://myserver:8080/myapp/hello.jsp");[/URL]
</cfscript>

and
Code:
<cfoutput>
#GetPageContext().include("[URL unfurl="true"]http://myserver:8080/myapp/hello.jsp")#[/URL]
</cfoutput>

Both came back with error on the GetPageContext() method with no further explanation of the ColdFusion error.

Please advise.
 
according to bennadel.com
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. The output of the target resources processing of the request is written directly to the ServletResponse output stream. Not exactly sure what this does. It appears to include a NEW page request. Cannot get it to stop having 500 NULL error.


what are you trying to do? show hello world in a cfm page by including a jsp? you can use cfhttp if all else fails.

Vegans are friends, not food...
 
Include() expects a relative path - not a fully qualified url.

Code:
<cfscript>
GetPageContext().include ("/hello.jsp?name=Bobby"); 
</cfscript>

Both came back with error on the GetPageContext() method with no further explanation of the ColdFusion error.

What did the CF log files say?

----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top