Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (1 vote)
463 views

Oracle WebLogic Server 12c

+rian +rown

Uploaded by

nagaraj0457
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
463 views

Oracle WebLogic Server 12c

+rian +rown

Uploaded by

nagaraj0457
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

Oracle WebLogic Server 12c: Deploying and Undeploying Applications

Purpose
This tutorial shows how to use the Oracle WebLogic Server 12c administration console to deploy a Java Enterprise Edition web application.

Time to omplete
ppro!imately 2" minutes

Overvie!
Java web application# li$e any Java Enterprise Edition application# can be deployed to an application server as an archive %ile. Web application archives use the %ile e!tension .war. This tutorial covers using the Oracle WebLogic Server 12c &12.1.1' administration console to deploy a simple Java Enterprise Edition web application. The tutorial shows how to start and run the application. The tutorial then shows how to redeploy an updated version o% the application. (inally# the tutorial shows how to undeploy the application.

So"t!are #e$uirements
The %ollowing is a list o% so%tware re)uirements*

Oracle WebLogic Server 12c &12.1.1'

Prere$uisites
+e%ore starting this tutorial# you should have completed the Oracle by E!ample tutorials titled Oracle WebLogic Server 12c: Installing WebLogic Server and Creating a Domain and Oracle WebLogic Server 12c: Configuring Managed Servers.

Deploying and Starting an Application


To deploy a Java web application and start it by using the administration console# per%orm the %ollowing steps* 1% ,ownload the bene%its.war %ile to the machine where your WebLogic Server domain and servers are. This is a sample Java web application archive to deploy. 2% -% the administration server o% the domain is not already running# it needs to be started. To start it# in a Terminal window# navigate to the domain directory# and enter the command* $ ./startWebLogic.sh

When prompted %or a username and pass!ord enter the credentials o% the domain administrator.

&% The managed server di..y1 should also be running. -% it is not already running# start it. -n another Terminal window# navigate to the domain directory# then cd into the bin subdirectory. Enter the command* $ ./startManagedWebLogic.sh dizzy1 http://host01.example.com:8001 This runs the script to start the managed server named dizzy1. lso notice the argument that gives the /0L o% the domain1s administration server* http://host01.example.com:8001. 2ote* /se the host name and port o% the administration server o% your domain.

When prompted %or a username and pass!ord enter the credentials o% the domain administrator.

'%

%ter the servers are up and running# access the WebLogic Server administration console. Open a web browser and enter the /0L o% the domain1s administration console* http://hostname:port/console -n this tutorial# that is* http://host01.example.com:8001/console 2ote* /se the host name and port o% the administration server o% your domain. On the Welcome screen# log in using the Username and Pass!ord entered to start the servers.

(% ,eploying an application is a change to the domain1s con%iguration# so it must %irst be loc$ed. -n the 3hange 3enter# clic$ the Loc) * +dit button.

,% /nder ,omain Structure# clic$ Deployments.

-% On the right# under ,eployments# clic$ the .nstall button.

/% (ind the

urrent Location %ield. /se the lin$s to browse to the location in which you placed the

downloadedbenefits.war %ile. There you will see benefits.war with a radio button ne!t to it. Select that radio button. +y using the lin$s and the radio button# the console %ills in the Pat0 %ield %or you. lternatively# you can type in the path and %ile name in the Pat0 %ield yoursel%. Then clic$ 1e2t.

3% On the ne!t screen# ensure that .nstall t0is deployment as an application is selected. Then clic$ 1e2t.

14% On the ne!t screen# select di55y1. Then clic$ 1e2t.

11% On the ne!t screen# $eep all the de%ault values and clic$ 1e2t.

12% On the ne!t screen# select 1o6 . !ill revie! t0e con"iguration later% Then clic$ 7inis0.

1&% 2otice the messages that the deployment was installed# but changes must be activated. lso notice the bene"itsapplication listed in the ,eployments table.

1'% -n the 3hange 3enter clic$ the Activate

0anges button.

1(% 2otice the message that the changes have been activated. lso notice the bene"its application listed in the

,eployments table is now in the 45repared4 state.

1,% Select the chec$ bo! to the le%t o% the bene"its application in the ,eployments table. Then use the Start drop6down list to select Servicing all re$uests.

1-% 3lic$ 8es to continue.

1/%

message is displayed indicating a start re)uest was sent. 7omentarily you will see the State o% the bene%its application become 4 ctive.4 This means that the application is available to those that have access to the server.

Testing the Application


To test the newly deployed web application# per%orm the %ollowing steps* 1% -n another web browser# enter the host and port %or the di..y1 managed server# %ollowed by /benefits. -n this tutorial# the /0L entered is* http://host01.example.com:8003/benefits

2% Select one or more o% the chec$ bo!es and clic$ the 9et .n"ormation button.

&% Then clic$ the :ac) To ;ome Page lin$.

Updating the Application


To update the deployed web application with a new version# per%orm the %ollowing steps* 1% ,ownload an updated version o% the web application# the bene%its2.war %ile. The web application1s deployment descriptors have been modi%ied to use a di%%erent conte!t root &path' to access the application. %ter it has been downloaded# rename benefits2.war to benefits.war. 0eplace the current benefits.war %ile with this new one.

2% 0eturn to the ,eployments page o% the administration console. -% needed# in the 3hange 3enter# clic$ the Loc) * +dit button. Select the chec$ bo! to the le%t o% the bene"its application in the ,eployments table. Then clic$ the Update button.

&% On the ne!t screen# clic$ the 7inis0 button.

'% -n the 3hange 3enter clic$ the Activate

0anges button.

(% -n another web browser# enter the host and port %or the di..y1 managed server &do not put /benefits on the end o% the /0L'. -n this tutorial# the /0L entered is* http://host01.example.com:8003 The new version o% the bene%its application has the conte!t root o% / rather than the conte!t root o% benefits# as the previous version had. -n other words# the bene%its application is now the de%ault application o% the di..y1 server.

Undeploying the Application


/ndeploying an application means stopping it# and then removing it %rom the con%iguration o% the server&s' on which it was deployed. The application archive %ile itsel% does not need to be removed.

To undeploy the web application# per%orm the %ollowing steps* 1% 0eturn to the ,eployments page o% the administration console. Select the chec$ bo! to the le%t o% the bene"its application in the ,eployments table. Then use the Stop drop6down list to select 7orce Stop 1o!.

2% 3lic$ 8es to continue.

&% The bene%its application has now been stopped and is no longer available. -n a web browser when its /0L is entered the server returns a 404 error. 2ote* The web browser may have cached pages. -% the bene%its application does appear# clic$ the re%resh button o% the web browser.

'% 0eturn to the ,eployments page o% the administration console. -% needed# in the 3hange 3enter# clic$ the Loc) * +dit button. Select the chec$ bo! to the le%t o% the bene"its application in the ,eployments table. Then clic$ the Delete button.

(% 3lic$ 8es to continue.

,% 7essages will be displayed indicating the deployment was deleted# but the changes must be activated. -n the 3hange 3enter clic$ the Activate 0anges button.

The bene%its application is no longer in the domain con%iguration. The archive %ile still e!ists# however# and the

application could be deployed again.

Summary
-n this tutorial# you learned how to*

,eploy a Java Enterprise Edition web application to an instance o% WebLogic Server by using the WebLogic Server administration console Start and stop a web application by using the administration console /pdate a web application to a new version by using the administration console /ndeploy a web application by using the administration console

#esources

(or documentation on Oracle WebLogic Server 12c# visit the ,ocumentation Library. (or more in%ormation on deployment# see the ,eploying pplications document. To learn more about Oracle WebLogic Server# re%er to additional O+Es in the OLL website.

redits

Lead urriculum Developer: +ill +ell Original O:+ reated :y: TJ 5ala..olo

You might also like