You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/advocates/create-java-webapp-to-app-service-linux/includes/2-azure-app-service-explanation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
Azure App Service is a fully managed platform for building, deploying, and scaling web apps. It supports multiple programming languages and frameworks and enables developers to focus on coding, while Azure manages the infrastructure and scaling automatically. Azure App Service offers built-in integration with popular development tools, continuous integration, and deployment capabilities, making it easier to create web and mobile applications with minimal setup.
4
4
5
-
:::image type="content" source="../media/azure-app-service.png" alt-text="Screenshot that shows Azure App Service in the Azure portal screen." lightbox="../media/azure-app-service.png":::
5
+
:::image type="content" source="../media/azure-app-service.png" alt-text="Screenshot of the Azure portal that shows the Azure App Service page." lightbox="../media/azure-app-service.png":::
6
6
7
7
## Key features of Azure App Service
8
8
9
-
The following are key features of Azure App Services:
9
+
Azure App Service provides the following key features:
10
10
11
11
- Multiple language support. Azure App Service supports a wide variety of programming languages and frameworks, including ASP.NET, Java, Python, Node.js, PHP, and Ruby. This flexibility enables developers to choose the best tools for their projects.
12
12
- Built-in DevOps. Azure App Service offers seamless integration with CI/CD pipelines using GitHub, Bitbucket, Azure DevOps, and other popular services. This integration ensures continuous deployment and automated testing in your app's lifecycle.
Copy file name to clipboardExpand all lines: learn-pr/advocates/create-java-webapp-to-app-service-linux/includes/3-exercise-create-simple-java-app.md
+67-67Lines changed: 67 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@ Web applications are widely used to handle real-world tasks such as inventory ma
2
2
3
3
Suppose you're a developer working on a project to build a dynamic web application where users can enter data and interact with your platform in real time. Your client wants this app to be available locally for testing, and on the cloud for easy access. This setup lets you test on your local machine first, and then deploys to a live environment as a seamless transition. Building this setup from scratch gives you flexibility for future updates and configurations.
4
4
5
-
In this module, you explore the essential steps for building and deploying a Java web app with Tomcat. You have two options: either clone an existing project from Azure Samples for immediate deployment, or build a new project from scratch with Maven. This module covers setting up your Maven project, configuring Tomcat, deploying the app locally, and using tools like Maven to manage dependencies and packages.
5
+
In this module, you explore the essential steps for building and deploying a Java web app with Tomcat. You have two options: either clone an existing project repo for immediate deployment, or build a new project from scratch with Maven. This module covers setting up your Maven project, configuring Tomcat, deploying the app locally, and using tools like Maven to manage dependencies and packages.
6
6
7
7
By the end of this module, you'll be able to create and deploy Java-based web applications on Tomcat, preparing you to support web application deployment both locally and in cloud-hosted environments.
8
8
9
9
## Create a Java Tomcat web app
10
10
11
11
In this exercise, you create a minimal Java web application that takes an input and displays the result on the screen. You then deploy the web app locally on your computer using Tomcat. You have the following two options:
12
12
13
-
1. Option 1: Clone the repo from Azure samples and immediately deploy your web app.
14
-
2. Option 2: Create a Maven Tomcat project from scratch.
13
+
- Option 1: Clone the sample repo and immediately deploy your web app.
14
+
- Option 2: Create a Maven Tomcat project from scratch.
15
15
16
-
## Option 1: Clone the repo from Azure samples and immediately deploy your web app
16
+
## Option 1: Clone the sample repo and immediately deploy your web app
17
17
18
18
To clone the repo, use the following steps:
19
19
@@ -25,23 +25,23 @@ To clone the repo, use the following steps:
25
25
1. Navigate to the cloned project repo by using the following command:
26
26
27
27
```bash
28
-
cd simple-tomcat-app
28
+
cd simple-tomcat-app
29
29
```
30
30
31
31
Use the following steps to configure your local Tomcat server so you can deploy locally to Tomcat:
32
32
33
33
> [!WARNING]
34
-
> Storing usernames and passwords directly in configuration files like **tomcat-users.xml** and Maven's **settings.xml** in plaintext isn't considered secure, and we generally don't recommend this practice - especially for production environments. However, as this is just a Learn module, other alternatives are outside the scope of this module. Don't use your real username and password!
34
+
> Storing usernames and passwords directly in configuration files like **tomcat-users.xml** and Maven's **settings.xml** in plain text isn't considered secure, and we generally don't recommend this practice - especially for production environments. However, other alternatives are outside the scope of this training module. Don't use your real username and password!
35
35
36
-
1. Edit the Tomcat configuration file **conf/tomcat-users.xml** so that it is like the following code sample:
36
+
1. Edit the Tomcat configuration file **conf/tomcat-users.xml** so that it looks like the following example:
1. Add your credentials to the Maven **~/.m2/settings.xml** file by using the following code example, where you replace `your-tomcat-username` with a username, and `your-tomcat-password` with a password:
44
+
1. Add your credentials to the Maven **~/.m2/settings.xml** file by using the following example, where you replace `your-tomcat-username` with a username, and `your-tomcat-password` with a password:
45
45
46
46
```xml
47
47
<servers>
@@ -59,7 +59,7 @@ Use the following steps to configure your local Tomcat server so you can deploy
59
59
mvn clean package cargo:deploy
60
60
```
61
61
62
-
Success! Access your app at `http://localhost:8080/simple-tomcat-app`.
62
+
After deployment, you can access your app at `http://localhost:8080/simple-tomcat-app`.
63
63
64
64
## Option 2: Create a Maven Tomcat project from scratch
@@ -243,7 +243,7 @@ Here's the full content of the **pom.xml** file:
243
243
244
244
### Create a web interface
245
245
246
-
To add a web page, edit the **src/main/webapp/index.jsp** file by using the following code example:
246
+
To add a web page, edit the **src/main/webapp/index.jsp** file by using the following example:
247
247
248
248
```html
249
249
<!DOCTYPE html>
@@ -265,7 +265,7 @@ To add a web page, edit the **src/main/webapp/index.jsp** file by using the foll
265
265
266
266
### Create a servlet
267
267
268
-
A servlet is a Java programming class used to extend the capabilities of a server by handling requests and generating dynamic content. Servlets run on the server side within a web container - such as Apache Tomcat - and are primarily used to process HTTP requests in web applications. When a client - for example, a web browser - sends a request to a web server, the servlet processes the request. The servlet performs any necessary business logic, for example, accessing databases or calling other services, and then generates a response - often in the form of HTML - to send back to the client. Servlets enable developers to create dynamic, platform-independent web applications using Java.
268
+
A servlet is a Java programming class used to extend the capabilities of a server by handling requests and generating dynamic content. Servlets run on the server side within a web container - such as Apache Tomcat - and are primarily used to process HTTP requests in web applications. When a client - for example, a web browser - sends a request to a web server, the servlet processes the request. The servlet performs any necessary business logic - for example, accessing databases or calling other services - and then generates a response - often in the form of HTML - to send back to the client. Servlets enable developers to create dynamic, platform-independent web applications using Java.
269
269
270
270
To create a servlet, use the following steps:
271
271
@@ -278,25 +278,25 @@ To create a servlet, use the following steps:
278
278
1. Update the contents of the **HelloSeverlet.java** file by using the following code example:
response.getWriter().write("<h1>Hello, " + name + "!</h1>");
298
+
}
299
+
}
300
300
```
301
301
302
302
Your new file structure looks like this:
@@ -325,17 +325,17 @@ Your new file structure looks like this:
325
325
Use the following steps to configure your local Tomcat server so you can deploy to it:
326
326
327
327
> [!WARNING]
328
-
> Storing usernames and passwords directly in configuration files like **tomcat-users.xml** and Maven's **settings.xml** in plaintext isn't secure and isn't generally recommended, especially for production environments. However, since this is just a Learn module, other alternatives are outside the scope of this module. Don't use your real username and password!
328
+
> Storing usernames and passwords directly in configuration files like **tomcat-users.xml** and Maven's **settings.xml** in plain text isn't secure and isn't generally recommended, especially for production environments. However, other alternatives are outside the scope of this training module. Don't use your real username and password!
329
329
330
-
1. Edit the Tomcat configuration file **conf/tomcat-users.xml** by using the following code example:
330
+
1. Edit the Tomcat configuration file **conf/tomcat-users.xml** by using the following example:
1. Add your credentials to Maven's **~/.m2/settings.xml** file by using the following code example, replacing `your-tomcat-username` with a username and `your-tomcat-password` with a password:
338
+
1. Add your credentials to Maven's **~/.m2/settings.xml** file by using the following example, replacing `your-tomcat-username` with a username and `your-tomcat-password` with a password:
339
339
340
340
```xml
341
341
<servers>
@@ -355,4 +355,4 @@ Use the following command to package and deploy your web app:
355
355
mvn clean package cargo:deploy
356
356
```
357
357
358
-
Success! Your app is available at `http://localhost:8080/simple-tomcat-app`.
358
+
After deployment, your app is available at `http://localhost:8080/simple-tomcat-app`.
0 commit comments