I have a method in a servlet JSP.class that throws a custom exception
created by me. That custom exception extends Exception.
package RMS;
import examples.ejb.beans.session.RMS;
import examples.ejb.beans.session.RMSHome;
import examples.ejb.beans.share.ProcessingErrorException;
...................
................
public String[] searchProject (HttpServletRequest request)
throws ProcessingErrorException
{
// Create a Project object
Project proj = makeProject (request);
if (proj.category.equals("All"))
...................
.................
..............
}
package examples.ejb.beans.share;
public class ProcessingErrorException extends Exception {
public ProcessingErrorException() {}
public ProcessingErrorException(String message) {super(message);}
}
I call that method in MyJsp.jsp file.
.....................
....................
// Search for Projects
int nrecs;
String[] list = null;
try{
list = rms.searchProject( request );
}catch(Exception e){
throw new Exception();
}
if (list == null)
{
nrecs = 0;
}
else
nrecs = list.length/3;
............................
.......................
.....................
But I am getting the following error.
C:/Program
Files/Allaire/JRun/servers/default/RMSRoot/WEB-INF/jsp/jrun__projList2ejspd.
java:63:28:63:40: Error: Type
examples/ejb/beans/share/ProcessingErrorException was not found.
[1404]
[1405] 06/13 13:07:50 error (JRun) Errors occurred during compilation:
C:/Program
Files/Allaire/JRun/servers/default/RMSRoot/WEB-INF/jsp/jrun__projList2ejspd.
java:61:28:61:40: Error: Could not find package named:
[1406] C:\jdk1.3.1\jre\lib\rt.jar(examples/ejb/beans/share),
[1407] C:\jdk1.3.1\jre\lib\i18n.jar(examples/ejb/beans/share),
[1408] C:\jdk1.3.1\jre\lib\sunrsasign.jar(examples/ejb/beans/share),
[1409] C:\Program Files\Allaire\JRun\lib\ext/examples/ejb/beans/share,
[1446] C:\Program
Files\Allaire\JRun\servers\default\RMSRoot\WEB-INF\classes/examples/ejb/bean
s/share or
[1447] C:\Program
Files\Allaire\JRun\servers\default\RMSRoot\WEB-INF\jsp/examples/ejb/beans/sh
are
[1448] C:/Program
Files/Allaire/JRun/servers/default/RMSRoot/WEB-INF/jsp/jrun__projList2ejspd.
java:61:28:61:40: Error: Type
examples/ejb/beans/share/ProcessingErrorException was not found.
[1449]
Will the generic exception in my jsp not catch my custom exception since the
custom exception extends Exception?
I tried importing the examples.ejb.beans.share.ProcessingErrorException in
my jsp but I am getting the following error.
Compilation error occured:
Found 3 errors in JSP file:
C:\\Program
Files\\Allaire\\JRun\\servers\\default\\RMSRoot\\projList.jsp:15: Error:
"examples/ejb/beans/share/ProcessingErrorException" is either a misplaced
package name or a non-existent entity.
C:\\Program
Files\\Allaire\\JRun\\servers\\default\\RMSRoot\\projList.jsp:26: Error:
Could not find package named:
C:\\Program
Files\\Allaire\\JRun\\servers\\default\\RMSRoot\\projList.jsp:26: Error:
Type examples/ejb/beans/share/ProcessingErrorException was not found.
The processingerrorexception.class is in the jar file along with other ejbs
in the deploy directory. JSP.class (servlet) and other jsp's are in
different directory. JSP.class is able to locate the ejbs and other classes
in the jar file but my jsp's aren't able to. Can anybody let me know how
this is done. Thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists