I used xsp:include to import my classes, but it comes up with Package “mypackage” not found in import Why?
You need to tell Java where to find your classes, by putting the directory of your root package (if any, or just the directory of your classes, if not) in the CLASSPATH. This is not specific to Cocoon – it applies to many types of Java software. Cocoon does not see classes in special directories like WEB-INF/classes because (a) there is no standard way for a servlet engine to communicate its full CLASSPATH to its servlets (e.g. Cocoon) and (b) javac, jikes and/or Java’s Classloader API were not designed for this scenario. Cocoon 2 aims to solve this problem but it will probably require far-reaching and/or servlet-engine-specific changes. However, it is on the Todo list to add certain industry-standard directories like WEB-INF/classes to the Cocoon internal CLASSPATH. I get the exception java.lang.NoClassDefFoundError: sun/tools/javac/Main This happens because XSP requires the java compiler to be present in your classpath – so, if you have Java 1.2 or above, you have to put the tools.ja
Related Questions
- I used to attend Temple University but have not taken classes in a while. How do I register for classes to complete my degree?
- I used xsp:include to import my classes, but it comes up with Package "mypackage" not found in import Why?
- Can ARDT results be used to determine placement in Algebra 1 classes?