###### tags: `Java` `Debugging`
# Java Debugging
## Helpful Print Statements
- To make testing variables stand out
```java!
System.out.println("=".repeat(20));
System.out.printf("\n\tVARIABLES:\t <VAR_TYPE> \n\n"); // Add: ,<VAR_NAME> before )
System.out.println("=".repeat(20));
```
Help with printf: [Java Starter notes](/VzARqjb1TzadDcPGhJAesA)
## Errors
### Setup
- My .jsp file is not launching:
- Try Updating Maven for your project. (Right-click on the project, hover over Maven, then select Update Project). This can be tried with Force Update selected and unselected.

### Forms
- Yellow wording on form AND/OR submit button not working.

- Make sure you have the following at the top of your jsp file.
```!
<!-- for forms -->
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix = "fmt" uri = "http://java.sun.com/jsp/jstl/fmt" %>
<!-- for validation -->
<%@ page isErrorPage="true" %>
```
- Make sure you have the following in **src/main/resources/** *application.properties*
` spring.mvc.hiddenmethod.filter.enabled=true
`
- When doing an edit, recieved 'PUT' not supported.

- Double check your action path in the form. For me, it was going to my getMapping not my putMapping.
### Red Underlines
- @ Parameters underlined

- Try Ctrl + Shift + o
- import names are underlined

- Check to make sure you have all the
### Whitelabel Error Page
- Bean property is not readable

- make sure to check your getter and setter for the listed attribute. It doesn't hurt to delete and redue the getter and setter for that attribute.