I am trying to configure Eclipse and have followed all the steps described in the LiveSite developer manual in Appendix C. I have created a Java project called Livesite at iw-home/local/config/lib/content_center/livesite_customer_src and then added the livesite.jar to my project. What I noticed was the jar file is there in the Refrenced Libraires for Eclipse but did not copy the jar file to at iw-home/local/config/lib/content_center/livesite_customer_src/lib folder. Do I need to copy this file manually? I then created the folder structure under the scr folder as follows:
Src
Com
Zewa
Sample
This is where my HelloWorld.java resides.
*******************************************************************
import com.interwoven.livesite.common.xml.DOMWrapper;
import com.interwoven.livesite.external.ExternalException;
import com.interwoven.livesite.external.BaseExternal;
import java.util.Hashtable;
import org.w3c.dom.Document;
public class HelloWorld extends BaseExternal
{
/** The External Document rootnode XPath */
public static final String EXTERNAL_XPATH = "/External";
/**
*
@see BaseExternal#execute(String, java.util.Hashtable)
*/
public Document execute(String method, Hashtable params) throws ExternalException
{
String helloWorld = "Hello World!";
// create a dom:
DOMWrapper dom = new DOMWrapper(getEmptyExternalDoc());
// add in the hello-world
node.dom.appendChild(EXTERNAL_XPATH,dom.createElement("hello-world",helloWorld));
// add in the method now.
dom.appendChild(EXTERNAL_XPATH,dom.createElement("method",method));
// return the XML document.
return dom.getDocument();
}
}
*******************************************************************What do I need to change to update the package statement of the code. I get the following error when I try to build the toolkit.
Error
compile:
[javac] Compiling 1 source file to E:\iw-home\local\config\lib\content_center\livesite_customer_
out\src
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:2: cannot find symbol
[javac] symbol : class DOMWrapper
[javac] location: package com.interwoven.livesite.common.xml
[javac] import com.interwoven.livesite.common.xml.DOMWrapper;
[javac] ^
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:3: package com.interwoven.livesite.external does not exist
[javac] import com.interwoven.livesite.external.ExternalException;
[javac] ^
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:4: package com.interwoven.livesite.external does not exist
[javac] import com.interwoven.livesite.external.BaseExternal;
[javac] ^
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:23: cannot find symbol
[javac] symbol: class BaseExternal
[javac] public class HelloWorld extends BaseExternal
[javac] ^
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:30: cannot find symbol
[javac] symbol : class ExternalException
[javac] location: class com.zewa.sample.HelloWorld
[javac] public Document execute(String method, Hashtable params) throws ExternalException
[javac] ^
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:34: cannot find symbol
[javac] symbol : class DOMWrapper
[javac] location: class com.zewa.sample.HelloWorld
[javac] DOMWrapper dom = new DOMWrapper(getEmptyExternalDoc());
[javac] ^
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:34: cannot find symbol
[javac] symbol : class DOMWrapper
[javac] location: class com.zewa.sample.HelloWorld
[javac] DOMWrapper dom = new DOMWrapper(getEmptyExternalDoc());
[javac] ^
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:34: cannot find symbol
[javac] symbol : method getEmptyExternalDoc()
[javac] location: class com.zewa.sample.HelloWorld
[javac] DOMWrapper dom = new DOMWrapper(getEmptyExternalDoc());
[javac] ^
[javac] E:\iw-home\local\config\lib\content_center\livesite_customer_src\src\com\zewa\sample\Hel
loWorld.java:36: package node does not exist
[javac] node.dom.appendChild(EXTERNAL_XPATH,dom.createElement("hello-world",helloWor
ld));
[javac] ^
[javac] 9 errors