Skip to main content
Participant
August 1, 2008
Question

Using Coldfusion in .JSPs

  • August 1, 2008
  • 2 replies
  • 294 views
I am relying on a short Coldfusion script to do some behind the scenes work that results in setting a few variables for use in the html code of a .jsp file. But I cannot seem to find the right JSP tags to do so.

I did come across some suggestions on calling coldfusion scripts in JSPs:
<jsp:include page="coldFusionFile.cfm">
but coding suggestions on how to use the coldfusion variables seem not to do the job ():
<%@page import="java.util.*" %> /// with the following
<%= mainVar.getAttribute("myVar")%> /// should pull data from mainVar.myVar
/// or this
<%= ((Map)(mainVar.getAttribute("myApp"))).get("myVar")%> /// should pull data from mainVar.myVar

The above suggestions were culled from a few pages, so, perhaps they are not going to do what they were reported to do (given the changed circumstances)...?..Any further suggestions for a beginner?

This topic has been closed for replies.

2 replies

BKBK
Community Expert
Community Expert
August 4, 2008
SingularPoint, I would indeed try something else. Given the hype, the implementation and documentation of the interoperation of JSP and CFM pages in Coldfusion is bad, miserably bad. Adobe's own examples don't work.

Yes, they work sometimes. But here sometimes is not nearly enough. You meet NullPointerExceptions every turn you make. The documentation is sketchy. Thanks to the hype, the same old sketchy documentation, including the examples that don't work, is travelling all over the place. Like bad currency, if you asked me.



Inspiring
August 1, 2008
Make the cf code a webservice.