Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Common classes required for each application  RSS feed

 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am done with 2 of my JSF web applications, both the applications required a common set of classes such as the FacesListener,
a custom UserAuthentication filter and so on.For now, each application has it's own copy.
However, I feel that I should be packaging all my common classes into a jar file and then add the jar to all the future web applications
that need same information (which I am sure there are a couple apps). Creating one single jar file for all the classes is where I am confused at the moment.
Do I create a simple java project with the common directory structure and then package it as a jar?

Thanks!
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I create a simple java project with the common directory structure and then package it as a jar?


Yeah, that's exactly what you do!

Which development environment? Eclipse?

But essentially, you put all your common code into one project, in one single place, external to any JSF components. Then, just package that up in a JAR file, and put the JAR file in the lib directory of your web projects so they can see the required classes.

-Cameron McKenzie
 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cameron Wallace McKenzie wrote:
Do I create a simple java project with the common directory structure and then package it as a jar?


Yeah, that's exactly what you do!

Which development environment? Eclipse?
Netbeans

But essentially, you put all your common code into one project, in one single place, external to any JSF components. Then, just package that up in a JAR file, and put the JAR file in the lib directory of your web projects so they can see the required classes.

-Cameron McKenzie
The thing that confused me is should I create a simple java application and the JSF RI jar files or ??

Thanks for the quick reply

Ok got it I am creating a simple project with all the common code

Thanks
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!