Skip to main content
Participant
September 11, 2006
Question

Where to put POJO so CF sees it?

  • September 11, 2006
  • 1 reply
  • 446 views
Where do I place a simple Java POPO in the CF application server directory stucture so I can use it from a CF page? Does the POJO .class file go into the WEB-INF/lib folder or somewhere else?

The excellent article I found on this topic (excerpt below between the two dashed lines) says "how" to do what I need to do, but not "where" the .class file needs to go ( http://www.adobe.com/devnet/coldfusion/articles/java.html):

------------------------------------------------------

Importing objects
When working with Java objects, load a Java object onto which you will operate. ColdFusion MX uses the CreateObject() function to import an object. Alternatively, use the cfobject tag to get a Java class, as in the following example:

<CFOBJECT type=”java” class=”MyClass” name=”myObj”>

------------------------------------------------------

Thanks in advance for any help or suggestions!!!

-- M
    This topic has been closed for replies.

    1 reply

    Inspiring
    September 11, 2006
    javacf wrote:
    > Where do I place a simple Java POPO in the CF application server directory
    > stucture so I can use it from a CF page? Does the POJO .class file go into the
    > WEB-INF/lib folder or somewhere else?

    jars usually go there. classes usually go in web-inf\classes. might need
    to stop/restart cfserver service for it to pick up the new files.

    you might also look into something like javaLoader which makes this sort
    of thing a bit easier especially on shared hosts.

    http://www.compoundtheory.com/?action=javaloader.index