Revathi
Revathi

Reputation: 1203

Java : A query about jar files

While Uploading a war file to the server , can you please tell , what jar files should be acutually kept inside the server lib ?

Because I see, all the jar files which we keep during eclipse Build path will not be present inside the war lib (required for compilation suppourt )

Upvotes: 0

Views: 323

Answers (2)

Andres Olarte
Andres Olarte

Reputation: 4380

Basically depends depends on what your app server provides. For example, you app server will provide things like the javax.servlet packages, so you shouldn't include the servlet-api jars that you required for compilation. Some app server will provide the java mail apis, so you shouldn't include those. Some app servers wont, so you'll the jar files. Hope this helps.

Edit: if by specific to your app you mean that you wrote them, then you need them in the war.

Upvotes: 1

Ickster
Ickster

Reputation: 2217

Not all of the Eclipse build path entries should be present, but generally, all of the actual "jar" dependencies should be present. The small list of exceptions will be things provided by the server. (These will mostly be things like database connectors when the connection will be provided by the server as opposed to created by the application. If you're using Tomcat instead of a full app server, you might be creating connections in the app instead of getting them from the server. In that case, you'd need to include any database connector jars.)

Any Library entries (e.g., JRE System Library, Web Container libraries) will need to be available through the server, and not bundled in the WAR.

Upvotes: 0

Related Questions