Import in Java doesn't instatiate anything, all it does is make a reference
used by the compiler to use shorthand access to packages so you don't have
to write out the whole package name every time you reference a class in that
package.

The closest equivalent in CF would be:

<cfset portlet = "com.plumtree.remote.portlet.">
<cfset homePortlet = createObject("java", "#portlet#HomePortlet")>

Sam

----------------------------------------------
Blog:  http://www.rewindlife.com
Chart: http://www.blinex.com/products/charting
----------------------------------------------

-----Original Message-----
From: Jeff Chastain [mailto:[EMAIL PROTECTED]
Sent: Friday, September 17, 2004 8:45 AM
To: CF-Talk
Subject: Java Import -> CF

When you see the following line in a JSP file ...
   <% page language="java" import="com.plumtree.remote.portlet.*" %>
... is there a way to duplicate this functionality in CFMX?  Is it possible
it import an entire library like this rather than instantiating every class
individually with cfobject?

Thanks
-- Jeff
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to