This post is divided into 3 sections:
1) Create a web-app.
2) Deploy it on the managed server.
3) Accessing the web-app.
Let's Start:
1) Create an web-app: For this i have an already created web-app, which contains a headers.jsp page.
- headers.jsp - This page will be used to display all the HTTP Headers that are set by the OAM-Weblogic.
2) Deploy web-app:
- Login to weblogic server: http://<host:port>/console
- Once you gets logged in, select 'Deployment' option under Domain Structure.
Note: Before you move to next step, copy the web-app folder to the domain directory i.e.
Copy to this path: <MiddlewareHome>/user_projects/domains/<your_domain_name>/
- Click 'install' button: This will lead you to deployment process.
- Now select your app folder
- Select the folder like here it is showing 'source' as it contains the app:
Press Next....
Note:
- Here the 'source' folder has the web app pages, thus when we need to actually access these resources from the browser. We will fire the request as:
http://<host:port>/source/Login.jsp
- Thus in case if your folder name is something else, than you will access it from that name only.
Syntax: http://host:port/<webapp folder name>/<resource name>
- On next page: nothing needs to be change as of now, keep on selecting the default option. Just press next.
- Available Targets: Select 'oam_server1' or you can also deploy it on Admin Server and press Next.
- General Assistance: This will show you the selected options, here you just need to press Next.
Note: One thing that you need to make a note of is the deployment name. Because in future if you need to update the app, you need the name.
- Finish: Click 'Finish' & it will deploy the app.
Note: Click the 'Activate Changes' button on the top left, this will apply the changes & no restart is required.
3) Accessing the web-app:
- We need to make changes in mod_wl_ohs.conf file, & we need to front end the deployed app.
Note: Here i have front ended the app with OHS.
- '/source' is the app folder that we have chosen while deploying.
- Mention the host name - this will be the host on which you have installed the OHS.
- Mention the Port - this will be the port on which managed server is listening.
- Save the changes.
- Restart the OHS server.
- Open the browser, fire the url - http://<host:port>/source/headers.jsp
- It will redirect you to credential collector page. Provide the credentials.
- And you will get the 'headers.jsp' resource.
- Now you can even try to access other resources present on your OHS Server i.e. you have placed in htdocs folder. Like:
http;//<host:port>/index.html
- You will not be asked for the credentials again, as you have already logged in & your OAMAUthnCookie & OAM_ID cookies are present with your browser.
Enjoy :-)