If you have to deploy a Jersey based RESTful web service on WebLogic server, you will have to deploy the jersey library on the WebLogic server and reference it from your weblogic.xml descriptor file.
WebLogic 11g comes bundled with Jersey library but we have to explicitly deploy & make it available for consumption. Use the following command to deploy the Jersey library on your WebLogic server;
java -classpath <Middleware_Home>/wlserver_10.3/server/lib/weblogic.jar weblogic.Deployer -verbose -noexit -source <Middleware_Home>/wlserver_10.3/common/deployable-libraries/jersey-bundle-1.9.war -targets AdminServer -adminurl t3://localhost:7001 -user weblogic -password xxxxxx -deploy -library
This command would invoke the weblogic.Deployer which will deploy the Jersey bundle library as a shared library on your WebLogic server.
Now, all we need to do is to reference this library from the RESTful webservice application via weblogic.xml
Now, you can deploy your Jersey based RESTful webservice on WebLogic server.
WebLogic 11g comes bundled with Jersey library but we have to explicitly deploy & make it available for consumption. Use the following command to deploy the Jersey library on your WebLogic server;
java -classpath <Middleware_Home>/wlserver_10.3/server/lib/weblogic.jar weblogic.Deployer -verbose -noexit -source <Middleware_Home>/wlserver_10.3/common/deployable-libraries/jersey-bundle-1.9.war -targets AdminServer -adminurl t3://localhost:7001 -user weblogic -password xxxxxx -deploy -library
This command would invoke the weblogic.Deployer which will deploy the Jersey bundle library as a shared library on your WebLogic server.
Now, all we need to do is to reference this library from the RESTful webservice application via weblogic.xml
<?xml version = '1.0' encoding = 'windows-1252'?> <weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"> <library-ref> <library-name>jax-rs</library-name> <specification-version>1.1</specification-version> <implementation-version>1.9</implementation-version> <exact-match>false</exact-match> </library-ref> </weblogic-web-app>
Now, you can deploy your Jersey based RESTful webservice on WebLogic server.