tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Percival Bragg <percivalbr...@yahoo.com>
Subject Re: JavaBean problem
Date Wed, 29 Jan 2003 13:33:48 GMT
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 <operations@planman91.fsnet.co.uk>
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" <hoju@visi.com>
> To: "Tomcat Users List"
> <tomcat-user@jakarta.apache.org>
> 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:
> tomcat-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> >
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message