Yeah.  This is any annoying JSP-related bug.

Any classes that you DIRECTLY reference in a jsp must be physically present
in the WAR.  That is because the way tomcat compiles jsp classes it only
puts classes from the WAR in the JSPCompiler classpath.

This includes:
Classes from import statements
Classes from useBean statements
Classes from variable declarations.
Classes from cast expressions.
If you call a method in your code, all the declared classes of the methods
parameters, return value, and exceptions.

I have not found a way around this yet.  In our code, we use a bean class to
isolate the jsp from much of the java code.  This allows us to cut down on
the number of classes in the war, because classes referenced by the bean but
not by the jsp do not have to be in the war but can be in a shared lib.

You may also be able to put your shared lib directly in the war in
WEB-INF/lib.  I have never tried this but have heard that it can be done.
If you lib is in the war but not in the ear then it will not be visible to
ejbs.  You could probably put it both places as well - then the copy in the
war would only be used for jsp compilation.


> -----Original Message-----
> From: Alexander Jerusalem [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 24, 2001 11:07 AM
> To: JBoss-User
> Subject: [jBoss-User] Classpath problems...
> 
> 
> Hi,
> 
> I'm having problems with referencing my EJBs from a JSP 
> (jboss_tomcat). I 
> followed the instructions in the documentation and put a lib 
> directory in 
> my ear that contains the interfaces of my EJBs. Additionally 
> I included the 
> following line in the META-INF/MANIFEST.MF:
> Class-Path: ./lib/myejblib.jar. But when I'm opening my JSP 
> in the browser 
> I keep getting "... not found in import" compiler errors with my EJB 
> packages. In addition to that, the compiler complains that it 
> doesn't know 
> EJBHome and EJBObject interfaces.
> 
> Any help would be appreciated,
> 
> Alexander Jerusalem
> www.vknn.org
> [EMAIL PROTECTED]
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]
> 





---------------------------------------------------------------------
This message (including any attachments) contains confidential, proprietary
or privileged information intended for a specific purpose and individual(s),
and is protected by law.  If you receive this message in error, please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender.  Any unauthorized disclosure,
copying or distribution of any part of this message, or the taking of any
unauthorized action based on it, is strictly prohibited.


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to