In this post I will be explaining on how to install the webapp hosting feature in the WSO2 Identity Server 3.2.3. Note that this way you can install any feature on any WSO2 Cabon based product.
Up to step 19 on this post is about installing the webapp feature in the Identity Server and from step 20 onward, it is on deploying a sample webapp.
[Click on the images to enlarge]

[1]. Sign-in to the Identity Server.

1. Sign-in 
[2]. Click on the configure tab in the left pane.

2. Configure tab

[3]. Click on feature link.

3. Features

[4]. In the upcoming page, click on Add Repository.

4. Add repository

[5]. Provide a suitable name for the repository to be added, use the URL http://dist.wso2.org/p2/carbon/releases/3.2.3/ as for the Location. And then click on the Add button

5. Adding P2 repo

[6]. Repository is being added. This will take few seconds.

6. Repository being added

[7]. Once is the repository is being added successfully you can find features in the repository. Click on Find Features button.

7. Find features

[8]. Loading features. This will take few seconds.

8. Loading features

[9]. Once features are loaded, you will get a list of features. At the bottom of the feature list, you would find the webapps related features. Select "Webapp Application Deployer", "Webapp Application Management" and "Webapp Management 3.2.2" features.

9. Webapp features

[10]. Click on the install button at the very bottom to install the features.

10. Install

[11]. Now you will be prompted the details of the features being installed. Click on the Next button.

11. Features info

[12]. Accept the licence and click on Next to continue with installation.

12. Licence

[13]. Now features are being installed. This would take a moment.

13. Installing features

[14]. Click on Finish to complete the feature installation process.

14. Finish installation

[15]. Now we have to restart the Identity Server to use the newly installed features. Click on the Main tab in the left pane.

15. Main tab

[16]. Click on the Shutdown/Restart link under Manage.

16. Shutdown/Restart

[17]. Click on Graceful Restart.

17. Graceful restart

[18]. Now the WSO2 Identity Server is being restarted. This would take some time.

18. Being restarted

[19]. One the Identity Server is restarted successfully, You would see the Web Applications feature under Mange of the Main tab.

19. Web applications feature

[20]. Now lets deploy a sample webapp. Click on the Add link under Web Applications.

20. Add webapp

[21]. Select the webapp (the .war file) to deploy.

21. Choose the war file

[22]. Once the .war file is selected, click on the Upload button to upload it.

22. Uploading the webapp

[23]. Webapp is being deployed.

23. Webapp being deployed

[24]. Once webapp is deployed, click on the List link to see the deployed webapps.

24. List webapps

[25]. You will see the uploaded webapp is deployed and listed there. Click on the Go To URL to run the web application.

25. Run the webapp

You can install any other feature as well using the same steps.

1

View comments

  1. I wanted to know if you could inform me on how to use identity server as an xacml engine for an application that is hosted on an external server (tomcat or glassfish for example) what would i need to change or configure in identity server

    ReplyDelete

Project description

The API provides a functionality to create and read a value from the server. Purpose of the project is to demonstrate how the values can be persisted in the server memory using singleton objects.

POST method creates a value in the server GET method reads boack the value from the server Sourcode

The complete source code of the project can be found in GitHub at https://github.com/sureshatt/aspdotnetcore-proj/tree/master/APIWithService

Running the project

Run the project in Visual Studio.

The application will start in port 65387 due the configuration in the Program.cs file.

Project Description

This is a simple REST API which manages a static list of names. Each name in the list can be identified by their index of the list. 

GET method returns the complete list of names GET(id) method returns the name at the provided index of the list POST method adds a new name to the list and returns the updated list of names.

Here I will be using ASP.Net Core 1.1 and the ASP.NET Core Web API project template of Visual Studio (for Mac)

Creating the project with templates

The ASP.NET Core Web API template can be found under .Net Core menu.

Once a project is created with the template, there are two important class files (.cs) being created.
2

Being a Java EE developer for many years I was wondering how I can start with the .Net stack, specially in the web development. Coincidentally this is a very good era to start with .Net as now the .Net framework is now open source, cross-platform and in new versions (.Net Core and ASP.Net Core). Further, the favorite .Net IDE, Visual Studio is too now available for Mac. Therefore this is the perfect combination to start web development in .Net.

Here is a simple C program,

int main() {

return 0;

}

Now let us generate the Assembly code for this,

gcc -S mycode.c

The output is given bellow,

.section __TEXT,__text,regular,pure_instructions

.macosx_version_min 10, 12

.globl _main

.align 4, 0x90

_main:                                  ## @main

.cfi_startproc

## BB#0:

pushq %rbp

Ltmp0:

.cfi_def_cfa_offset 16

Ltmp1:

.cfi_offset %rbp, -16

movq %rsp, %rbp

Ltmp2:

.cfi_def_cfa_register %rbp

xorl %eax, %eax

movl $0, -4(%rbp)

objdump tool can be used to disassble an executable program to the assembly code.
1

It is pretty straight forward to generate the assembly code out of the C program using GCC.

C program

int main() { 

int x = 1; 

return x; 

}

Now GCC -S switch can be used to just to genrate the assembly code

gcc -S mycode.c 

The Assembly code would be store in the file mycode.s.

Similar to otool in Mac, readelf and objdump can be used to have a look into the content of a compiled C program.

In the process of understanding how memory allocation works for the programs it is very important to know the content of the C compiled program.

Lets look at the sample C program:

int main() {

return 1;

}

Save the above code in a file name init.c

Let's compile the program with gcc,

gcc -c init.c

This command will create the following Object file.

In the process of understanding how memory allocation works for the programs it is very important to know the content of the C compiled program.

Lets look at the sample C program:

int main() {

return 1;

}

Save the above code in a file name init.c

Let's compile the program with gcc,

gcc -c init.c

This command will create the following Object file. Let us now view the file content with otool in Mac.

SASM IDE requires the following dependencies been installed priorly:

NASM assembler  gcc-multilib  Above dependencies can be easily installed with apt-get.
Loading