I am a bit confused about creating packages for javabeans. I am working thru a book titled "JSP Weekend Crash Course" which mentions nothing about compiling the bean into a package or using an include statement in the JSP page. Is the book incorrect or is this also a viable solution.
--- Wilson Snook <[EMAIL PROTECTED]> wrote: > >> So, instead of WEB-INF/classes/MyBean, it would > be something like > WEB-INF/classes/com.mypackage.MyBean << > > What works for me is: > > MyBean: > (declaration at top of bean class file) > package com.mypackage; > > Directory structure: > WEB-INF > => classes > => com > => mypackage > => MyBean > > Note that the package declaration uses fullstops > ("periods" in American) and > the directory path has a separate directory for > "com" and "mypackage", the > bean residing in the latter. > > Does > WEB-INF > => classes > => com.mypackage > => MyBean > > also work? > > Regards, > > Wilson (newbie) > > ----- Original Message ----- > From: "Jacob Kjome" <[EMAIL PROTECTED]> > To: "Tomcat Users List" > <[EMAIL PROTECTED]> > Sent: Wednesday, January 29, 2003 4:34 AM > Subject: Re: JavaBean problem > > > > > > Is the bean in an actual defined package or the > default package (no > > package). It *must* be in a package. So, instead > of > > WEB-INF/classes/MyBean, it would be something like > > WEB-INF/classes/com.mypackage.MyBean > > > > Now import the com.mypackage.MyBean bean into your > jsp. Things should > work > > better now. > > > > Jake > > > > At 05:38 PM 1/28/2003 -0800, you wrote: > > >I have just created and compiled my first > JavaBean > > >into > <tomcat-install>\webapps\ROOT\WEB-INF\classes and > > >am tying to access it from a jsp page in > > ><tomcat-install>\webapps\ROOT directory. I am > getting > > >jsp compile errors because the jsp page cannot > find > > >the class defined in the JavaBean. > > > > > >Any help would be appreciated. My version of > tomcat is 4.1.18. > > > > > > >__________________________________________________ > > >Do you Yahoo!? > > >Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > > >http://mailplus.yahoo.com > > > > > > >--------------------------------------------------------------------- > > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > > >For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]