Skip to main content
Participant
April 8, 2013
Question

Problem Interoperating with JSP pages

  • April 8, 2013
  • 1 reply
  • 477 views

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" />

</jsp:include>  

   

Where urlstring was set to http://someurl

On the Cold fusion side I have:

<cfoutput>

<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

This topic has been closed for replies.

1 reply

Inspiring
April 10, 2013

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.