Page 1 of 1
Multi-line display on JFileUpload
Posted: Wed Feb 08, 2012 6:01 am
by cibcibcib
I need to return some custom error message to the front-end. I wonder how can I display it into multiple lines.
e.g. in my code i have tried "line 1," + "/n" + "line2,"...also tried System.getProperty("line.separator");
However it still display as "line1,line2" in front-end.
Please help...
Re: Multi-line display on JFileUpload
Posted: Wed Feb 08, 2012 9:46 pm
by support
Separator is \n not /n
Re: Multi-line display on JFileUpload
Posted: Thu Feb 09, 2012 3:53 am
by cibcibcib
sorry for my typo. Actually i have tried no matter either "/n" or "\n", it doesn't work anyway.
maybe I provide more info here...when the file is upload, i will call a servlet to do some checking on the file content and return errors if detected.
response.setHeader("custommessage", <multi-line error string>));
So I wonder how can I achieve this?
Re: Multi-line display on JFileUpload
Posted: Sun Feb 12, 2012 10:33 am
by support
Could try with \r\n?
I'm not sure it will work because HTTP header are also ending with \r\n
For instance:
"X-Powered-By: PHP/5.2.17[\r][\n]"
Re: Multi-line display on JFileUpload
Posted: Fri Feb 17, 2012 3:48 pm
by cibcibcib
tried but no luck....