This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The input tag at line 20 is illegal because <c:choose> can only contain <c:when> or <c:otherwise> tags -- it makes no sense to have markup outside one of those tags. What is your intent for that input markup? Should it be part of a "when", or part of an "otherwise"?
Joined: Jun 02, 2014
Okay, I have this error with all the 3 <input> tags. Not just the one at line# 20. And I observed that the input tag inside the choose is causing only for the types 'hidden' and 'checkbox'. In the same JSP, I have few radio buttons and few select dropdown fields. Either radio button or the dropdown input tags are working perfectly fine but the hidden and checkbox input elements.
I tried attaching the whole of my jsp, but the system won't let me attach files with extension .jsp or .txt. So, uploaded the whole of the jsp at http://textuploader.com/0l5p.
Regardless of how the error messages describe it, it's still (like Bear says) not valid to have any elements inside a <c:choose> element except for <c:when> and <c:otherwise> elements. So you're going to have to do something about the <input> element you showed us and the other ones, which presumably are similar.
It's quite possible that you have missing end tags which are causing problems, although it's very hard to tell by looking at the code you uploaded. You have such extreme levels of indentation that half of each line slops over into the next line, which makes it very hard to tell what goes with what. I know this sort of thing is hard to avoid in a language which doesn't allow you to break a block of code off into a separate method, but reducing your indentation to two spaces instead of eight might help.
Joined: Jun 02, 2014
Got a fix for this issue finally....
From the sample code that I've posted earlier, I've moved the HTML element '<input type="hidden"....> right after the 2nd <c:when...> tag from <c:choose> to the outer <spring:bind.....>.
Here's the new code after the fix.
Thanks for your advises Bear and Paul... Appreciate your help.