As you know, Thymeleaf uses OGNL to process commands.So, Without Spring and SpEL this can be achieved like this:
<td><input class="form-control" type="text" name="inputValue" th:maxlength="${@com.example.yourpackagename.Constants@MAX_TESTCASE_VALUE_LENGTH}" /></td>