3.7. Change the Application Server-side Functionality
3.7.1. Modify Member.java
The Java resources can be edited with the IDE Java Editor, as demonstrated in the procedure below. Despite LiveReload being enabled in BrowserSim, these changes are not reflected until the application is republished to the server.
Procedure 3.6. Modify Member.java
- In the Project Explorer view, expand Java Resources→src/main/java→com.company.example.mymobileapp.model.
- Double-click
Member.javato open it in the IDE Java Editor. - Scroll through the
Member.javafile and locate the following code:@NotNull @Size(min = 10, max = 12, message = "10-12 Numbers") @Digits(fraction = 0, integer = 12, message = "Not valid") @Column(name = "phone_number") private String phoneNumber;
- Replace
min = 10withmin = 6. - Save the
Member.javafile.
3.7.2. Republish the Application
You must republish the application to the JBoss EAP server in order to see the
Member.java changes reflected in the BrowserSim simulated device web browser, as detailed here.
To republish the application, in the Servers view, right-click my-mobile-app and click . The JBoss EAP server republishes the application and, once complete, the Console view displays the following:
Replaced deployment "my-mobile-app.war" with deployment "my-mobile-app.war"
To test the changes made to the
Member.java file, in the simulated device web browser, in the Phone # field type a six digit number. You do not see the phone # should be minimum 10 and maximum 12 digits error message, indicating that you are viewing the updated running version of the application.

