How to deploy jar file in Weblogic server

Oracle Weblogic Server

You can not deploy a standalone JAR onto WebLogic Server without deployment lifecycle.
You need to package the Applet JAR inside a WAR file to be able to deploy it on WLS i.e. you need to create a WAR file that includes JAR, WEB-INF folder and web.xml or only deploy the jar file as a library

There are two options available for deploying WAR on WLS (1) deploy a packaged .war OR (2) deploy WAR file in exploded format

Option 1:-
The following steps can be followed to create a WAR file.
– create an empty web.xml as shown above article
– create WEB-INF folder under project root
– put the Applet jar in project root i.e. say folder <WL_DOMAIN>/mycontext
– choose the <WL_DOMAIN>/mycontext folder to be deployed on WLS
– access a link in the browser http://hostname:7001/mycontext/jarFile.jar

Option 2:-
Below are the steps to create a deployable exploded directory for the Applet JAR :-
– create empty web.xml
– create WEB-INF folder under project root
– put the Applet jar in project root
– With ‘jar’ command in path, please run the command ‘ jar cvf ../mycontext.war . ‘ . This creates a war file mycontext.war in a folder above the project root folder.
– deploy mycontext.war
– access a link in the browser http://hostname:7001/mycontext/jarFile.jar

 

If you want to learn more on packaging options please read below url:

https://docs.oracle.com/cd/E13222_01/wls/docs60/programming/packaging.html

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.