Begivenhed
17. mar., 21 - 21. mar., 10
Deltag i meetup-serien for at bygge skalerbare AI-løsninger baseret på brugscases fra den virkelige verden sammen med andre udviklere og eksperter.
Tilmeld dig nuDenne browser understøttes ikke længere.
Opgrader til Microsoft Edge for at drage fordel af de nyeste funktioner, sikkerhedsopdateringer og teknisk support.
This article shows you how to deploy a Java WebSphere web app with sign-in by Microsoft Entra account to Traditional WebSphere on Azure Virtual Machines.
When you deploy your application to WebSphere Application Server, your redirect URL changes to the redirect URL of your deployed WebSphere Application Server instance. Use the following steps to change these settings in your properties file:
Navigate to your app's authentication.properties file and change the value of app.homePage
to your server URL and port number you're planning to use, as shown in the following example:
# app.homePage is by default set to dev server address and app context path on the server
# for apps deployed to azure, use https://your-sub-domain.azurewebsites.net
app.homePage=https://<server-url>:<port-number>/msal4j-servlet-auth/
After saving this file, use the following command to rebuild your app:
mvn clean package
After the code finishes building, copy the .war file over to your target server's file system.
Because the redirect URI changes to your deployed app on WebSphere, you also need to change the redirect URI in your Microsoft Entra ID app registration. Use the following steps to make this change:
Navigate to the Microsoft identity platform for developers App registrations page.
Use the search box to search for your app registration - for example, java-servlet-webapp-authentication
.
Open your app registration by selecting its name.
Select Authentication from the menu.
In the Web - Redirect URIs section, select Add URI.
Fill out the URI of your web app, appending /auth/redirect
- for example, https://<server-url>:<port-number>/auth/redirect
.
Select Save.
To deploy the application, use the following steps:
On the Applications tab, select New Application, then New Enterprise Application.
Choose the .war file you built, then select Next until you get to the Map context roots for Web modules installation step.
For the context root, set it to the same value as after the port number in the 'Redirect URI' you set in sample configuration/Azure app registration. That is, if the redirect URI is http://<server-url>:9080/msal4j-servlet-auth/
, then the context root should just be msal4j-servlet-auth
.
Select Finish.
After the application finishes installing, go to the WebSphere enterprise applications section of the Applications tab.
Select the .war file you installed from the list of applications and then select Start to deploy.
After it finishes deploying, navigate to http://<server-url>:9080/{whatever you set as the context root}
and you should be able to see the application.
Your deployment is now complete.
For other deployment options, see the following articles:
Begivenhed
17. mar., 21 - 21. mar., 10
Deltag i meetup-serien for at bygge skalerbare AI-løsninger baseret på brugscases fra den virkelige verden sammen med andre udviklere og eksperter.
Tilmeld dig nuTræning
Modul
Log på brugere med Microsoft Entra-id i en Java-webapp - Training
Få mere at vide om, hvordan du godkender brugere med Microsoft Entra ID og får godkendt adgang til data i en Java-webapp ved hjælp af Microsoft Authentication Library.
Certificering
Microsoft Certified: Associate for identitets- og adgangsadministrator - Certifications
Demonstrer funktionerne i Microsoft Entra ID for at modernisere identitetsløsninger, implementere hybridløsninger og implementere identitetsstyring.