java - How to traverse/iterate through a nested JAXB object to display it in JSP page? -


i constructed soap request , received response. unmarshalled response using jaxb context , got object contains response.

jaxbcontext jc = jaxbcontext.newinstance(responsemessage.class); unmarshaller um = jc.createunmarshaller(); responsemessage output = (numberresponsemessage)um.unmarshal(soapresponse.getsoapbody().extractcontentasdocument()); 

now can access data in response object (output) via get..()/..getvalue() methods , print in console. issue arises when try send response object adding modelandview attribute jsp page.

model model.addattribute("response", output); 

the error - jsp don't know how iterate on given items(as try loop).

<c:foreach var ="res" items="${output}"> <td>${res.transactionid}</td> </c:foreach> 

since response object contains hundreds of data , inner jaxb<> arrays, not possible set data user bean , access.

can advice me how iterate on response object in jsp page?

you'd better maintain table fair special characters; can verify letters not other types. suppose new guy on c++; hence example need.do below:

bool isspecialcharacter(char c) {   static special_chars[] = "~`!@#$%^&*()_+-=\\\/?><,.";   char *p = &special_chars[0];   while(*p) {     if(*p == c) return true;   };   return false; } 

i though keelar suggested.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -