something nasty occured today as i tried to pass an attribute from a spring controller to a JSP-page view. That attribute is an XML string of the form "<root><item1>...</item1><item2>...</item2>...</root>", written without newlines. all fine and dandy so far, but when i tried to obtain the attribute in my jsp using ${var}, all i got was the item values without any of the tags... to fix this i had to rewrite the code in the jsp to <% String str = request.getAttribute("var").toString %> . I'm curious why the jsp has interpreted the xml string like that
No comments:
Post a Comment