Shailesh Narkhede wrote:</html:form> tag closing in <c:if test="${standAlone}"> tag this is not right.
tag opening & closing should be in propare sequence.
paste whole jsp here, we can figure out error.
Thanks,
Shailesh
David Newton wrote:The issue is that you can't arbitrarily nest tags like that--you can't do it in XML, either.
David Newton wrote:There's no difference between JSTL custom tags and Struts custom tags (other than their functionality, of course).
David Newton wrote:...
JSTL custom tags are custom tags, and Struts 2 custom tags are custom tags. They're processed in the same way, at the same time. You can't do this, either:It has nothing to do with being a Struts tag--do you see what I mean? Those are just JSTL tags. This is illegal JSP.
David Newton wrote:Whether or not there's "anything to be gained" isn't relevant: illegal JSP is illegal JSP. This has *nothing* to do with Struts, and everything to do with JSP compilation.
Yes, you can do it with plain old HTML, because HTML elements aren't custom tags, and aren't processed by the JSP compiler as anything other than string literals. They don't *do* anything.
In your original example what's in the section between the <html:form> tags? If they're not <html:...> form elements then I hardly see the point of using a Struts tag to generate the form element in the first place. If they are then what's the point of having them there without the form tag?
IMO you're trying to do too much in the JSP anyway, and it'd be easier and cleaner to maintain using some other mechanism, like JSTL templates, or some other solution.
In any case, there's not much more to be said about this--you're trying to do something JSP simply doesn't support.
Consider Paul's rocket mass heater. |