Copy link to clipboard
Copied
I'm having a problem interoperating java and cold fusion
I'm trying to follow the example code described here:
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-786c.html
But to no avail. 😞
On the java side in my jsp I have:
request.setAttribute("myvariable", "This");%>
<% ((Map)session.getAttribute("myApp")).put("myVariable", "is a");%>
<% ((Map)application.getAttribute("myApp")).put("myVariable", "test.");%>
<jsp:include page="<%= urlstring %>">
<jsp:param name="name" value="Robert" />
Where urlstring was set to http://someurl
On the Cold fusion side I have:
<h2>Hello #URL.name#</h2>
Request.myVariable: #Request.myVariable#<br>
Session.myVariable: #Session.myVariable#<br>
Application.myVariable: #Application.myVariable#<br>
</cfoutput>
In the Coldfusion/Runtime/logs first I receive:
04/08 12:16:35 Error [jrpp-160] - Element NAME is undefined in URL. The specific sequence of files included or processed is: C:\TerraDotta 11\index.cfm, line: 64
And then after deleting the line to see if the next line can be evaluated I receive:
04/08 12:21:35 Error [jrpp-160] - Element MYVARIABLE is undefined in REQUEST. The specific sequence of files included or processed is: C:\TerraDotta 11\index.cfm, line: 64
Any ideas as to what I am doing wrong?
Nelson
Copy link to clipboard
Copied
cfdump your request scope after you output the url.name. I suspect it will be an empty struct. If so, cfdump your variables scope and try to find the ones coming from jsp.