A new line after each tag in eclipse when editing jsp files

When automatically formatting JSP files in Eclipse using Ctrl + Shift + F, it tries to put as many tags on a line as possible, and then a tag that does not fit will break and put the attributes on the next line.

This creates very dirty code, an example below.

        <div class="type-text"><label for="echo">Project Name: </label> <s:textfield
            id="projectName"
            name="projectName"
            value="Project Name"
        >
        </s:textfield></div>

Does anyone know how best to format JSP files?

+5
source share
1 answer

, : . Eclipse Java (EE), (X) HTML/JSP . IntelliJ . Eclipse intented (X) HTML/JSP. Web > HTML > , . , , .

+4

All Articles