By the may, I encounter many problems to use a bean in a jar package.
 
my bean starts with
 
package pakdab;
 
import ....
 
public class DataAccessBean implements Serializable {
 
 
[...]
 
}
 
The bean itself works fine when not included in a jar, btw I import it, which was this thread's original subject.
 
 
Then I put the class in a bean, and store that bean in d:\jrun\classes\, which is one of the directories that are searched for beans.
 
I call it this way, which seems to be correct
<jsp:useBean id="instance2" class="pakdab.DataAccessBean" scope="request" />
But the class is never found among all the tries he does :
 
Found 3 semantic errors compiling "d:/JRun/jsm-default/services/jse/servlets/jsp/test2.java":
    39.         pakdab.DataAccessBean instance1 = (pakdab.DataAccessBean) JSPRuntime.instantiateBean("instance1", "pakdab.DataAccessBean", "request", __instance1_was_created, pageContext, request, session, application);
                <---->*** Error: Could not find package named:
                D:\JRun\classes/pakdab,
                D:\JRun\jsm-default\classes/pakdab,
                D:\JRun\lib\jrun.jar(pakdab),
                D:\JRun\lib\servlet.jar(pakdab),
                D:\JRun\webl\WebL.jar(pakdab),
                D:\JRun\lib\jsp.jar(pakdab),
                D:\JRun\lib\xml4j.jar(pakdab),
                D:\JRun\lib\xt.jar(pakdab),
                D:\JRun\lib\fesi.jar(pakdab),
                D:\JRun\lib\cfanywhere.jar(pakdab),
                D:\JRun\lib\NetComponents.jar(pakdab),
                D:\JRun\lib\OROMatcher.jar(pakdab),
                D:\JRun\instantdb\Classes/pakdab,
                D:\JRun\lib\jrunadmin\jrunadmin.jar(pakdab),
                D:\jdk1.2.1\jre\lib\rt.jar(pakdab),
                D:\jdk1.2.1\jre\lib\i18n.jar(pakdab),
                D:\jdk1.2.1\lib\tools.jar(pakdab),
                D:\JRun\lib\jrunadmin\swing.jar(pakdab),
                D:\JRun\lib\cos.jar(pakdab),
                D:\JRun\lib\mail.jar(pakdab) or
                D:\JRun\lib\activation.jar(pakdab)
    39.         pakdab.DataAccessBean instance1 = (pakdab.DataAccessBean) JSPRuntime.instantiateBean("instance1", "pakdab.DataAccessBean", "request", __instance1_was_created, pageContext, request, session, application);
                       <------------>
*** Error: Type pakdab/DataAccessBean was not found
 
 
I must be misdoing something, but cannot find what. Is this a Jrun's directory problem (but I *really* have tried a lot of possibilities), something when I build my package, or an error in the call of the bean ?
 
Best regards
Sylvain
 
-----Message d'origine-----
De : John Bødker <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : jeudi 25 novembre 1999 17:02
Objet : Re: Running a JSP

>Hi Reeta
>
>The problem is probably that your bean is not in a package.
>When a bean is not in a package it must be imported.
>Try to add the following line to your jsp-page:
>
>     <%@ page import="MyBean" %>
>
>I think that will solve your problem.
>
>- John.
>
>N.B.: Also make sure that the directory with your bean is in the classpath.
>
>
>
>
>
>
>Reeta Mittal <[EMAIL PROTECTED]>@JAVA.SUN.COM> on 24-11-99
>08.55.06
>
>Please respond to Reeta Mittal <[EMAIL PROTECTED]>
>
>Sent by:  A mailing list about Java Server Pages specification and
>      reference <[EMAIL PROTECTED]>
>
>
>To:   [EMAIL PROTECTED]
>cc:
>Subject:  Running a JSP
>
>
>Hello Everyone,
>
>I am using JSWDK1.0.1 for JSP.
>I am writting a test JSP in which I am using a test bean. Can anyone please
>tell me where I hav to place the Bean ?
>I have placed the JSP in the example directory and BEAN in the WEB-INF
>directory.
>I have created a subdirectory under example directory and a subdirectory
>under WEB-Inf directory.
>I have used the JAVAC for compiling the bean.
>I am getting
>500: Internal server error.
>
>Can anyone please help me for this....
>
>Regards,
>Reeta
>
>
>Regards,
>Reeta
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>

Reply via email to