-
1. Re: Is there a way to send emails for loglevel ERROR from JBoss, how to configure in JBoss EAP6.1.0 GA
mulayarvind Dec 27, 2013 12:04 AM (in response to viswanadhad)Hi,
I am migrating my applications from JBOSS 5.1CR1 to JBOSS 7.1.1 Final.
In JBOSS 7.1.1 Final, when I download a .csv file, it displayes it in text in the browser and does not download it as a downloadable file.
It works fine in JBOSS 5.1CR1.
Do I need to do any seeting in any of the configuration files?
Thanks in advance.
Arvind Mulay.
-
2. Re: Is there a way to send emails for loglevel ERROR from JBoss, how to configure in JBoss EAP6.1.0 GA
ybxiang.china Dec 27, 2013 3:38 AM (in response to mulayarvind)Have you set your response's content type correctly???
Please try
response.setContentType("application/ms-excel"); // or you can use text/csv
More details:
http://stackoverflow.com/questions/13152738/export-to-csv-file-and-open-in-browser
:
-
3. Re: Is there a way to send emails for loglevel ERROR from JBoss, how to configure in JBoss EAP6.1.0 GA
ybxiang.china Dec 27, 2013 3:37 AM (in response to viswanadhad)Is there a way to configure email sending for log level ERROR in JBoss EAP6.1.0
~~~~~I think the answer is NO.
-
4. Re: Is there a way to send emails for loglevel ERROR from JBoss, how to configure in JBoss EAP6.1.0 GA
mulayarvind Dec 27, 2013 4:21 AM (in response to ybxiang.china)Hi xiang,
Many thanks for your reply.
I am not using servlet for writing into .CSV file. It's a plain java.
--------------------------------------------------------------------------------------------------------------------------------------------------
public void PriceListExcel_ArrayList(java.util.ArrayList excelArrayList , String fname){
boolean isExists=false;
try {
File fileObj = new File(fname);
isExists = fileObj.exists();
if(isExists){
fileObj.delete();
}
isExists = fileObj.exists();
if(!isExists){
File outputfile = new File(fname);
FileWriter put = new FileWriter(fname,true);
for (int r=0; r<excelArrayList.size(); r++) {
if(excelArrayList != null) {
put.write((java.lang.String)excelArrayList.get(r));
put.write("\n");
}
}
put.close();
} else {
System.out.println("File still Exists");
}
} catch(Exception e){
System.out.println("Price List Excel: " + e);
}
}
--------------------------------------------------------------------------------------------------------------------------------------------------
This is working fine on JBOSS 5.1 CR1.
Any idea?
-
5. Re: Is there a way to send emails for loglevel ERROR from JBoss, how to configure in JBoss EAP6.1.0 GA
wdfink Dec 27, 2013 4:30 AM (in response to ybxiang.china)To be correct, the answer is "NO, there is no mail handler by default"
But you can implement a CustomHandler which handle the message, I think best is asynchronous, and send it via mail.