So what I found out was, that eclipse reformat's jsp files by methods not line by line. Only if it can reformat the entire method properly it will try. For example if you have this kind of code in the method.
+ message
+ "</p></div><div class='modal-footer'>
<button type='button' class='btn btn-outline
btn-flat pull-right' data-dismiss='modal'>"
+ code + "</button>
</div>");
The refactor wont happen.
You need to make it to
+ message
+ "</p></div><div class='modal-footer'> <button type='button' class='btn btn-outline btn-flat pull-right' data-dismiss='modal'>"
+ code + "</button> </div>");
And now refactor will work. To this
+ message
+ "</p></div><div class='modal-footer'><button type='button' class='btn btn-outline btn-flat pull-right' data-dismiss='modal'>"
+ code + "</button></div>");