You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andy Richards <an...@esolution.co.uk> on 2003/04/14 11:10:24 UTC

packages and java beans

Can anyone help with this. I am migrating lots of applications from
tomcat3 to tomcat4. However those applications which use java beans not
in a package structure in the WEB-INF/classes directory are not found
from jsp pages.If i move the bean classes from WEB-INF/classes to
WEB-INF/classes/foo and import them all into my jsp packages things work
fine. From now on i will create all my beans in a package structure,
however is there a way i can make tomcat4 find my beans in
WEB-INF/classes without having to modify all my old applications into
packages ?

thanks

Andy


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


Re: packages and java beans

Posted by Bill Barker <wb...@wilshire.com>.
Welcome to the big TC3-TC4 hurdle ;-).

TC3.3.x uses the flat directory structure for the packages (as I recall,
TC3.2.x was even worse) of JSP pages.  So, in particular, the page
/myapp/index.jsp is defined in the default package of /myapp/.  This permits
the dirty programming feature of not importing classes, and having it work.
I've personally chewed out several of my programmmers for this.

With TC4, you can't do this.  All JSP pages are in a non-default package, so
you have to import everything.  If you are using a 1.3.x JVM (or lower),
this is just a few import statements.  If you are using a 1.4.x JVM, then
you need to re-package all of your beans (as you should have done in the
first place).

"Andy Richards" <an...@esolution.co.uk> wrote in message
news:1050311423.1170.20.camel@andy.esolution.office...
> Can anyone help with this. I am migrating lots of applications from
> tomcat3 to tomcat4. However those applications which use java beans not
> in a package structure in the WEB-INF/classes directory are not found
> from jsp pages.If i move the bean classes from WEB-INF/classes to
> WEB-INF/classes/foo and import them all into my jsp packages things work
> fine. From now on i will create all my beans in a package structure,
> however is there a way i can make tomcat4 find my beans in
> WEB-INF/classes without having to modify all my old applications into
> packages ?
>
> thanks
>
> Andy




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