0

After using Tomcat for quite a while we have decided to move to Glassfish. In Tomcat we used to put all the Jar's we wanted to share between projects under the tomcat7/lib dir, in Glassfish I've put the Jar's in glassfish/domains/domain1/lib and yet I cannot import classes I have in the Jar's there. The project build path has ofcourse the Glassfish System Libraries there.

Do I have to reference every Jar in a default-web.xml in the config dir or am I missing something else here?

user3050187
  • 17
  • 1
  • 6

1 Answers1

0

This should work, if it doesn't I guess there is something wrong with the way you import.

You can also place the JAR files in $GLASSFISH_HOME/glassfish/lib, then they are available for all domains.

If you mean you can't import the classes into your code inside your IDE then this is an other issue. If you are using Maven then you should set the corresponding dependencies to the scope "provided". If you don't use Maven you'll have to add the specific JAR files to your classpath....

See also:

Community
  • 1
  • 1
unwichtich
  • 13,712
  • 4
  • 53
  • 66
  • doh... Didn't do the 2nd part. I was sure Glassfish uses the same behavior as Tomcat and loads the jars in the classpath for all prjects without need to add them to each project. Thanks alot! – user3050187 Jan 22 '14 at 15:38