views:

70

answers:

3

Hi guys, I was wondering if is it possible to deploy a jar file in Jetty? If not, are there applications servers who can do so?

I am beginner. I am asking this question because all the docs that i have found, it seems that we can only deploy war archive in application servers. Is that true?

A: 

I think that in web containers that support hot deployment, changing a jar in web-inf/lib or the web.xml triggers a reload of the webapp.

Seffi
A: 

Actually a War (web application archive) file is a Jar file; every servlet container accept jar packed application with .war extension.

systempuntoout
+1  A: 

War files are the standard (WAR - stands for Web ARchive) You can deploy a jar file into a war file or you can deploy a jar file into the classpath of the server or still yet you can deploy a jar file into lib folders of most servers.

Not sure why you would not want to deploy a WAR file for a web application.

There are valid reasons for the other two, if what you have is an application then once again go with the accepted way of doing things, if you have any problems you can always get support with the standard way of doing things.

Romain Hippeau
Actually, i am doing a project with my university lab and i wrote a tool for the researchers in java. The next step is to package this project into to a jar and deploy it in a server. After that, we can call this tool through web services.I was wondering if it is the best way to do that !!
Dimitri
Just package it into a WAR. Put your web services in the WAR also.You could put the web services in the WAR and then package your code into a jar that is inside the WAR
Romain Hippeau
Thanks for the answer
Dimitri