Jim,

If you want the webapps to share the same static values in the same class,
put them in common/classes. (this allows a webapps to affect the data in
another webapp).

If you want the webapps to be totally independent, put a separate copy in
each webapp's individual classes directory.

Or you may want to share some classes and not share others. Put them in the
appropriate place according to the above.

Note: This is because each webapp has it's own class loader, so behaviour is
different to "normal" java programs where static values are shared across
the whole virtual machine.

Hope this helps a bit,

Andy

> -----Original Message-----
> From: Jim Coble [mailto:[EMAIL PROTECTED]]
> Sent: 06 September 2002 20:08
> To: [EMAIL PROTECTED]
> Subject: Best practice advice sought: Classes shared by >1 webapp
>
>
> I am developing two web applications that will share a few classes in
> common.  What is the best practice for handling this?  Put a copy of the
> class in the WEB-INF/classes/ directory structure of both web
> applications?
> Or put the class in Tomcat's common/classes/ directory structure?  These
> common classes are specific to our business, not general purpose ones.
> Also, these web applications are for our own internal use only, not ones
> that we will bundle up and distribute, though we will need to
> manage moving
> them successfully from our development server to our production server.
>
> Thanks in advance for any advice on best practices in this situation.
> --Jim
>
> ==================================
> Jim Coble
> Senior Technology Specialist
> Center for Instructional Technology
> Email: [EMAIL PROTECTED]
> Voice: 919-660-5974  Fax: 919-660-5923
> Box 90198, Duke University
> Durham, NC 27708-0198
> ==================================
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to