Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

306 document the webforj war deployment method #311

Merged
merged 46 commits into from
Nov 26, 2024

Conversation

MatthewHawkins
Copy link
Member

@MatthewHawkins MatthewHawkins commented Nov 11, 2024

TODO:

  • BLS/Licensing section
  • Remove hidden sidebar items on final approval of layout and update links
  • Update the HelloWorld code once we settle on a final version
  • Add deep linking to current articles
  • Update maven install plugin section per Hyyan's issue
  • Redirect the current getting started to the new one
  • For the titles, don't change them, but keep them based on what is in the sidebar
  • Rename hello-world to skeleton-starter-hello-world. Update this URL everywhere it's applicable
  • Change "latest version" to ${webforj.version} in new getting started
  • Remove cards/explanation in getting started
  • Replace @InlineStyleSheet with @Stylesheet
  • Move configuration before advanced topics in the sidebar
  • Using BBjServices title change to Running With BBjServices, and change title of the overview article to "Installaton with BBjServices"
  • Rename BBj configuration to install plugin

@MatthewHawkins MatthewHawkins linked an issue Nov 11, 2024 that may be closed by this pull request
@MatthewHawkins MatthewHawkins marked this pull request as draft November 11, 2024 13:51
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

vale

docs/config/bbj-installation/local.md|49 col 197| [Google.Acronyms] Spell out 'BASIS', if it's unfamiliar to the audience.
docs/config/bbj-installation/local.md|52 col 1| [Google.Contractions] Use 'it's' instead of 'It is'.
docs/config/bbj-installation/local.md|52 col 134| [Google.Quotes] Commas and periods go inside quotation marks.
docs/config/bbj-installation/local.md|68 col 30| [Google.We] Try to avoid using first-person plural like 'we'.
docs/config/bbj-installation/local.md|68 col 63| [Google.WordList] Use 'to' instead of 'in order to'.
docs/config/bbj-installation/local.md|80 col 5| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/local.md|84 col 10| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/local.md|88 col 42| [Google.WordList] Use 'click' or 'click in' instead of 'click on'.
docs/config/bbj-installation/local.md|92 col 67| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/local.md|96 col 10| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/local.md|137 col 72| [Google.We] Try to avoid using first-person plural like 'we'.
docs/config/bbj-installation/local.md|137 col 214| [Google.Exclamation] Don't use exclamation points in text.
docs/config/bbj-installation/local.md|151 col 234| [Google.WordList] Use 'app' instead of 'application'.
docs/config/bbj-installation/local.md|154 col 23| [Google.Contractions] Use 'it's' instead of 'it is'.
docs/config/bbj-installation/local.md|166 col 8| [Google.WordList] Use 'preceding' instead of 'above'.
docs/config/bbj-installation/local.md|166 col 22| [Google.Contractions] Use 'doesn't' instead of 'does not'.
docs/config/bbj-installation/docker.md|9 col 61| [Google.WordList] Use 'app' instead of 'application'.
docs/config/bbj-installation/docker.md|19 col 1| [Google.Contractions] Use 'it's' instead of 'It is'.
docs/config/bbj-installation/docker.md|28 col 68| [Google.Parens] Use parentheses judiciously.
docs/config/bbj-installation/docker.md|58 col 3| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/docker.md|62 col 3| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/docker.md|66 col 3| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/docker.md|70 col 3| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/docker.md|74 col 3| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/docker.md|78 col 3| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/docker.md|80 col 51| [Google.WordList] Use 'app' instead of 'application'.
docs/config/bbj-installation/docker.md|82 col 3| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/docker.md|86 col 3| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/config/bbj-installation/docker.md|101 col 118| [Google.Contractions] Use 'it's' instead of 'it is'.
docs/config/bbj-installation/docker.md|102 col 113| [Google.WordList] Use 'app' instead of 'application'.
docs/config/bbj-installation/docker.md|113 col 18| [Google.Contractions] Use 'doesn't' instead of 'does not'.
docs/config/bbj-installation/docker.md|137 col 34| [Google.WordList] Use 'preceding' instead of 'above'.
docs/config/bbj-installation/docker.md|142 col 63| [Google.WordList] Use 'app' instead of 'application'.
docs/config/bbj-installation/docker.md|150 col 19| [Google.WordList] Use 'app' instead of 'application'.
docs/config/bbj-installation/docker.md|153 col 20| [Google.WordList] Use 'app' instead of 'application'.
docs/config/bbj-installation/docker.md|153 col 44| [Google.WordList] Use 'app' instead of 'application'.
docs/config/bbj-installation/docker.md|158 col 40| [Google.WordList] Use 'app' instead of 'application'.
docs/intro/prereqs.md|19 col 132| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|19 col 231| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|22 col 37| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|22 col 199| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|25 col 23| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|28 col 24| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|29 col 22| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|41 col 127| [Google.Parens] Use parentheses judiciously.
docs/intro/prereqs.md|62 col 15| [Google.Acronyms] Spell out 'IDEA', if it's unfamiliar to the audience.
docs/intro/skeleton.md|6 col 3| [Google.Headings] 'App basics in webforJ' should use sentence-style capitalization.
docs/intro/skeleton.md|31 col 188| [Google.Contractions] Use 'what's' instead of 'what is'.
docs/intro/skeleton.md|39 col 162| [Google.WordList] Use 'style sheet' instead of 'stylesheet'.
docs/intro/skeleton.md|63 col 31| [Google.Quotes] Commas and periods go inside quotation marks.
docs/intro/getting-started.md|7 col 3| [Google.Headings] 'Getting started with webforJ' should use sentence-style capitalization.
docs/intro/getting-started.md|9 col 12| [Google.Exclamation] Don't use exclamation points in text.

---

# Configuration

You can configure webforJ using a project's POM file, which is designed to make deploying an app easy. The following sections outline the various options you can change to achieve a desired result.
To successfully deploy and run a webforJ app, a few key configuration files are required: webforJ.conf, web.xml, and blsclient.conf. Each of these files controls different aspects of the application’s behavior, from entry points and debug settings to servlet mappings and cache controls.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'app' instead of 'application'.


Tags within the `<configuration>` tag can be changed to configure your app. Editing the following lines in the default POM file that comes with the [`HelloWorldJava`](https://github.com/webforj/HelloWorldJava) starting repository will result in these changes:
The `webforJ.conf` file is a core configuration file in webforJ, specifying app settings like entry points, debug mode, and client-server interaction. The file is written in [HOCON format](https://github.com/lightbend/config/blob/master/HOCON.md), and should be located in the `resources` directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'HOCON', if it's unfamiliar to the audience.

- **`<publishname>`** This tag specifies the name of the app in the published URL. Generally, to run your program, you'll navigate to a URL similar to `http://localhost:8888/webapp/<publishname>`, replacing `<publishname>` with the value in the `<publishname>` tag. Then, the program specified by the `<classname>` tag is run.

- **`<debug>`** The debug tag can be set to true or false, and will determine whether or not the browser's console displays error messages thrown by your program.
### Example webforJ.conf File
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Example webforJ.conf File' should use sentence-style capitalization.

| Property | Explanation | Default Value |
|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| **`webforj.entry`** | Specifies the main entry point class for the webforJ app. Set this to the fully qualified name of your main app class, such as `com.webforj.samples.Application`. | N/A |
| **`webforj.debug`** | Enables debug mode when set to `true`, providing additional logging and detailed error messages. Useful for development but should be disabled in production. | `true` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'turn off' or 'off' instead of 'disabled'.

| Setting | Explanation | Default Value |
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|
| **`<display-name>`** | Sets the display name for the web app, typically derived from the project name. This name appears in app servers' management consoles. | `${project.name}` |
| **`<servlet>` and `<servlet-mapping>`** | Defines the `WebforjServlet`, the core servlet for handling webforJ requests. This servlet is mapped to all URLs (`/*`), making it the main entry point for web requests. | `WebforjServlet` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.


# Local Installation

This section of the documentation will cover the steps required only for users who wish to use webforJ for web and/or application development with a local BBj instance on their machine. This installation will not allow users to contribute to the webforJ foundation code itself.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'won't' instead of 'will not'.


1. Java and Maven download and configuration
2. BBj download and installation
3. Using the BBj Plugin Manager to create your application
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'app' instead of 'application'.

1. Java and Maven download and configuration
2. BBj download and installation
3. Using the BBj Plugin Manager to create your application
4. Launching your application
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'app' instead of 'application'.


### Java

Java **OpenJDK17** can be found [by following this link](https://adoptium.net/temurin/releases/). It is recommended
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'it's' instead of 'It is'.


### Maven

Maven should also be downloaded, and can be found [at this link](https://maven.apache.org/download.cgi). It is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'it's' instead of 'It is'.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

vale

docs/configuration/bbj-installation/local.md|92 col 67| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/configuration/bbj-installation/local.md|96 col 10| [Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.
docs/configuration/bbj-installation/local.md|166 col 8| [Google.WordList] Use 'preceding' instead of 'above'.
docs/intro/prereqs.md|14 col 132| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|14 col 231| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|17 col 37| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|17 col 199| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|20 col 23| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|23 col 24| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|24 col 22| [Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.
docs/intro/prereqs.md|36 col 127| [Google.Parens] Use parentheses judiciously.
docs/intro/prereqs.md|57 col 15| [Google.Acronyms] Spell out 'IDEA', if it's unfamiliar to the audience.

@@ -6,7 +6,7 @@ title: Hello World
import ComponentDemo from '@site/src/components/DocsTools/ComponentDemo';


To start a simple application, it is recommended to use webforJ's [HelloWorldJava repository](https://github.com/webforj/webforj-hello-world) as a template. This can be done using any of the [installation methods](../../installation/docker).
To start a simple application, it is recommended to use webforJ's `[skeleton-starter-bbj-hello-world](https://github.com/webforj/skeleton-starter-bbj-hello-world)` as a template. This can be done using any of the [installation methods](../../installation/docker).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'app' instead of 'application'.

@@ -6,7 +6,7 @@ title: Hello World
import ComponentDemo from '@site/src/components/DocsTools/ComponentDemo';


To start a simple application, it is recommended to use webforJ's [HelloWorldJava repository](https://github.com/webforj/webforj-hello-world) as a template. This can be done using any of the [installation methods](../../installation/docker).
To start a simple application, it is recommended to use webforJ's `[skeleton-starter-bbj-hello-world](https://github.com/webforj/skeleton-starter-bbj-hello-world)` as a template. This can be done using any of the [installation methods](../../installation/docker).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'it's' instead of 'it is'.


## 1. Navigate to the HelloWorldJava repository

To start, you'll need to go to the HelloWorldJava repository, which can be found [at this link](https://github.com/webforj/webforj-hello-world). Once there, click on the green **"Use this template"** button, and then the **"Open in a codespace"** option.
To start, you'll need to go to the HelloWorldJava repository, which can be found [at this link](https://github.com/webforj/skeleton-starter-bbj-hello-world). Once there, click on the green **"Use this template"** button, and then the **"Open in a codespace"** option.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'click' or 'click in' instead of 'click on'.

sidebar_position: 1
---

# Configurating webforJ properties
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Configurating webforJ properties' should use sentence-style capitalization.


## Configuring `webforJ.conf`

The `webforJ.conf` file is a core configuration file in webforJ, specifying app settings like entry points, debug mode, and client-server interaction. The file is written in [HOCON format](https://github.com/lightbend/config/blob/master/HOCON.md), and should be located in the `resources` directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'HOCON', if it's unfamiliar to the audience.


### Java

Java **OpenJDK17** can be found [by following this link](https://adoptium.net/temurin/releases/). It is recommended
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'it's' instead of 'It is'.


### Maven

Maven should also be downloaded, and can be found [at this link](https://maven.apache.org/download.cgi). It is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'it's' instead of 'It is'.


<b>While following this step, be sure that you install the BBj version that corresponds to the same webforJ version. </b><br/><br/>

[This video](https://www.youtube.com/watch?v=Ovk8kznQfGs&ab_channel=BBxCluesbyBASISEurope) can help with the installation of BBj if you need assistance with setup. The installation section of the BASIS website can be found [at this link](https://basis.cloud/download-product)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'BASIS', if it's unfamiliar to the audience.


![Plugin manager configuration](./_images/local/Step_2l.png#rounded-border)

The DWCJ entry should now be visible in the list of available plugins for download. Click on this entry in the list to select it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.


![Plugin manager configuration](./_images/local/Step_3l.png#rounded-border)

With the DWCJ entry selected, click the "Install" button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.


The Application class doesn't contain any additional methods because the configurations are set through annotations, and webforJ handles the app initialization.

With `Application.java` set up, the app is now configured with a title, dark theme, and routes pointing to the views package. Next, an overview of the `HomeView` class gives insight into what is displayed when the app is run.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Contractions] Use 'what's' instead of 'what is'.


### Class declaration and annotations

`HomeView` extends `Composite<FlexLayout>`, which allows it to act as a reusable component containing a [`FlexLayout`](../components/flex-layout) component. The [`@StyleSheet`](../styling/getting-started#using-annotations) annotation applies a CSS stylesheet, and [`@Route("/")`](../routing/overview) makes this the root route of the app.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'style sheet' instead of 'stylesheet'.


![Plugin manager configuration](./_images/local/Step_5l.png#rounded-border)

This tab displays installed plugins, which should now include the DWCJ entry. Click on the entry within the list.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.


![Plugin manager configuration](./_images/local/Step_6l.png#rounded-border)

With the DWCJ entry selected, click the "Configure" button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'DWCJ', if it's unfamiliar to the audience.

This will run the installation plugin which will do the work of setting your project up for you.

:::info
If the above command doesn't work, ensure your environment variables have been sufficiently edited to run Maven globally.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'preceding' instead of 'above'.

The official Oracle versions of the JDK can be found at [this link](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html). Alternatively, open source versions of the various JDK versions can be found at [here](https://adoptium.net/temurin/releases/).

:::tip Java versions
Newer versions of the JDK can also be found and can be used with webforJ as well
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.

Newer versions of the JDK can also be found and can be used with webforJ as well
:::

### How to verify your JDK installation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.

:::

### How to verify your JDK installation
After installing the JDK, verify the installation by running the following command in your terminal or command prompt:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'JDK', if it's unfamiliar to the audience.


<!-- vale on -->

Apache Maven is a build automation and dependency management tool that simplifies the process of including external libraries (like webforJ) in your project. Maven helps you manage project dependencies, compile code, run tests, and package applications.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.


A Java IDE provides a comprehensive environment for writing, testing, and debugging your code. Some popular choices for Java development include:

- **[IntelliJ IDEA](https://www.jetbrains.com/idea/download/)**: Known for its powerful Java support and rich plugin ecosystem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'IDEA', if it's unfamiliar to the audience.

sidebar_position: 1
---

# Configurating webforJ properties
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Configurating webforJ properties' should use sentence-style capitalization.


## Configuring `webforj.conf`

The `webforJ.conf` file is a core configuration file in webforJ, specifying app settings like entry points, debug mode, and client-server interaction. The file is written in [HOCON format](https://github.com/lightbend/config/blob/master/HOCON.md), and should be located in the `resources` directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'HOCON', if it's unfamiliar to the audience.


The `webforJ.conf` file is a core configuration file in webforJ, specifying app settings like entry points, debug mode, and client-server interaction. The file is written in [HOCON format](https://github.com/lightbend/config/blob/master/HOCON.md), and should be located in the `resources` directory.

### Example `webforj.conf` File
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'Example ************ File' should use sentence-style capitalization.

| Setting | Explanation | Default Value |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| **`<display-name>`** | Sets the display name for the web app, typically derived from the project name. This name appears in app servers' management consoles. | `${project.name}` |
| **`<servlet>` and `<servlet-mapping>`** | Defines the `WebforjServlet`, the core servlet for handling webforJ requests. This servlet is mapped to all URLs (`/*`), making it the main entry point for web requests. | `WebforjServlet` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.

hyyan
hyyan previously approved these changes Nov 13, 2024
Copy link
Member

@hyyan hyyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MatthewHawkins as discussed, we still the redirect from docs/installation/dockerto the new getting started section to be handled before this get merged

@hyyan hyyan marked this pull request as ready for review November 13, 2024 13:19

Continuous Deployment in Java development refers to automatically detecting and deploying code changes, so updates are reflected in the app without a manual server restart. This process typically involves updating Java classes and web resources on the fly.

In a webforJ app, this means regenerating the WAR file whenever modifications are made to the code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'WAR', if it's unfamiliar to the audience.

title: JRebel
---

JRebel is a Java development tool that integrates with the JVM to detect code changes and replace modified classes directly in memory, allowing developers to see code changes immediately without restarting the server.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'JVM', if it's unfamiliar to the audience.


The official JRebel site provides [quick start instructions](https://www.jrebel.com/products/jrebel/learn) to get the product up and running in various popular IDEs. Follow these instructions to integrate JRebel into your development environment.

After setup is complete, open a webforJ project, and ensure that the `scanIntervalSeconds` property in the `pom.xml` file is set to `0` to disable the automatic restart of the server. Once this is done, use the following command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'turn off' or 'off' instead of 'disable'.

| Property | Description | Default |
|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| **`scanIntervalSeconds`** | Configures how often the Jetty server scans for file changes in the **`pom.xml`**. The skeleton project sets this to `2` seconds. Increasing this interval can reduce CPU load but may delay changes being reflected in the app. | `2` |
| **`webforj.reloadOnServerError`** | When using hot redeploy, the whole WAR file is swapped. If the client sends a request while the server is restarting, an error occurs. This setting allows the client to attempt a page reload, assuming the server will be back online shortly. Only applies to development environments and only handles errors specific to hot redeployment. | `on` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'WAR', if it's unfamiliar to the audience.

@MatthewHawkins
Copy link
Member Author

@hyyan Ready for your first pass review on the deployment/reload sections


:::info Seeing your changes
If a change is made to a view or component that's already being displayed, JRebel won't force a reload of the page, as the server isn't restarted.
:::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before running the command document the Add the JRebel agent to MAVEN_OPTS
https://manuals.jrebel.com/jrebel/standalone/launch-from-command-line.html#maven-jetty-plugin-mvn-jetty-run


:::info Seeing your changes
If a change is made to a view or component that's already being displayed, JRebel won't force a reload of the page, as the server isn't restarted.
:::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove


| Property | Description | Default |
|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| **`scanIntervalSeconds`** | Configures how often the Jetty server scans for file changes in the **`pom.xml`**. The skeleton project sets this to `2` seconds. Increasing this interval can reduce CPU load but may delay changes being reflected in the app. | `2` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property name is scan, and it should be included in the POM file. This configuration table is both confusing and incorrect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The skeleton sets this to 1

| **`webforj.clientHeartbeatRate`** | Sets the interval for client pings to query server availability. This keeps the client-server communication open. For development, use shorter intervals for faster error detection. In production, set this to at least 50 seconds to avoid excessive requests. | `50s` |

:::tip Development value for `webforj.clientHeartbeatRate`
The [`skeleton-starter-hello-world`](https://github.com/webforj/skeleton-starter-hello-world) project sets this value to `8s` for development.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to 1s not 8s


While the Jetty Plugin is highly effective for development, it has a few potential limitations:

- **Memory and CPU usage**: Frequent file scanning, set by low `scanIntervalSeconds` values in the `pom.xml`, can increase resource consumption, especially on large projects. Increasing the interval may reduce load but also slows down redeployment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scan not scanIntervalSeconds


- **Memory and CPU usage**: Frequent file scanning, set by low `scanIntervalSeconds` values in the `pom.xml`, can increase resource consumption, especially on large projects. Increasing the interval may reduce load but also slows down redeployment.

- **Limited production use**: The Jetty Plugin is designed for development, not for production environments. It lacks the performance optimization and security configurations required for production, making it better suited to local testing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This no limitation. Remove

-DarchetypeVersion=24.20 \
-DartifactId=my-hello-world-app \
-Dversion=1.0-SNAPSHOT
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a table to explain the different command params

hyyan and others added 23 commits November 25, 2024 09:25
title: JRebel
---

JRebel is a Java development tool that integrates with the JVM to detect code changes and replace modified classes directly in memory, allowing developers to see code changes immediately without restarting the server.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'JVM', if it's unfamiliar to the audience.


The official JRebel site provides [quick start instructions](https://www.jrebel.com/products/jrebel/learn) to get the product up and running in various popular IDEs. Follow these instructions to integrate JRebel into your development environment.

After setup is complete, open a webforJ project, and ensure that the jetty `scan` property in the `pom.xml` file is set to `0` to disable the automatic restart of the server. Once this is done, use the following command:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.WordList] Use 'turn off' or 'off' instead of 'disable'.

|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| **`scan`** | Configures how often the Jetty server scans for file changes in the **`pom.xml`**. The skeleton project sets this to `2` seconds. Increasing this interval can reduce CPU load but may delay changes being reflected in the app. | `1` |

## webforJ configurations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[Google.Headings] 'webforJ configurations' should use sentence-style capitalization.


| Property | Description | Default |
|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| **`webforj.reloadOnServerError`** | When using hot redeploy, the whole WAR file is swapped. If the client sends a request while the server is restarting, an error occurs. This setting allows the client to attempt a page reload, assuming the server will be back online shortly. Only applies to development environments and only handles errors specific to hot redeployment. | `on` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'WAR', if it's unfamiliar to the audience.

---

import UnderConstruction from '@site/src/components/PageTools/UnderConstruction';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Semicolons] Use semicolons judiciously.


### Updating your project for WAR deployment

Switching your project to use WAR deployment in webforJ is straightforward. To do so, ensure the following components are in place:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'WAR', if it's unfamiliar to the audience.


1. **Include the Maven Jetty Plugin**:

Add the Maven Jetty plugin to your pom.xml to handle the deployment process. The Jetty plugin allows you to package and deploy your app as a WAR file effortlessly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'WAR', if it's unfamiliar to the audience.


2. **Add the required configuration and resources:**

Include the following essential files in your project to ensure it runs as a WAR:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'WAR', if it's unfamiliar to the audience.

```
### Configuration with `webforj.conf`

The `webforj.conf` file centralizes app configuration in HOCON format. With this file, you can tweak key settings for your app, such as the app's entry point, and whether or not to run in `DEBUG` mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Acronyms] Spell out 'HOCON', if it's unfamiliar to the audience.

| **Setting** | **Explanation** | **Default Value** |
|----------------------------------|----------------------------------------------------------------------------------------------------------------------------|--------------------------|
| `<display-name>` | Sets the display name for the web app, typically derived from the project name. This name appears in app servers' management consoles. | `${project.name}` |
| `<servlet>` and `<servlet-mapping>` | Defines the `WebforjServlet`, the core servlet for handling webforJ requests. This servlet is mapped to all URLs (`/*`), making it the main entry point for web requests. | `WebforjServlet` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[Google.Parens] Use parentheses judiciously.

@hyyan hyyan merged commit 22cbc6a into website Nov 26, 2024
1 check failed
@hyyan hyyan deleted the 306-document-the-webforj-war-deployment-method branch November 26, 2024 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Document the webforJ WAR deployment method
2 participants