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?
source
share