Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

J2EE Java Blueprints package/directory structure: best practice for common code?

Thread view: 
jsoftwaredev@gmail.com - 21 Oct 2007 00:14 GMT
I am working on several Java J2EE web applications using struts/
tomcat, and I have common Java code that I want to share between
multiple J2EE web apps.

Question: Is there a best practice for where common Java code should
be placed in the J2EE Java BluePrints package/directory structure?

http://java.sun.com/reference/blueprints/

Should this code be placed into a JAR file?

Or, is it OK to include the common source files as part of the build
for each app?

Would it make any sense to place the code under apps?

How about placing it in the root directory under src/java/com?

I'm just looking for ideas.
Arne Vajhøj - 21 Oct 2007 03:16 GMT
> I am working on several Java J2EE web applications using struts/
> tomcat, and I have common Java code that I want to share between
[quoted text clipped - 13 lines]
>
> How about placing it in the root directory under src/java/com?

I have never studied those blueprints but you should put
the common code in a project of its own and build it to a jar
file that you distribute to your web app projects (and runtime
end up in WEB-INF/lib of all the war's).

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.