Multi-line display on JFileUpload

Upload core product.
Post Reply
cibcibcib
Posts: 6
Joined: Fri Dec 09, 2011 9:38 am

Multi-line display on JFileUpload

Post 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...

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Multi-line display on JFileUpload

Post by support »

Separator is \n not /n

cibcibcib
Posts: 6
Joined: Fri Dec 09, 2011 9:38 am

Re: Multi-line display on JFileUpload

Post 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?

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Multi-line display on JFileUpload

Post 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]"

cibcibcib
Posts: 6
Joined: Fri Dec 09, 2011 9:38 am

Re: Multi-line display on JFileUpload

Post by cibcibcib »

tried but no luck.... :cry:

Post Reply