- Check the truststore path in a .properties file it should be on correct location?
- You can try (double escape \) in that path for windows machine.
Java, Struts 1 & 2, Spring, Hibernate, iBatis, Jasper Reports, RDBMS, JDBC, JSP, Servlet, HTML, JS, AJAX, JQuery
Friday, December 2, 2011
SSL Certificate err
Thursday, October 20, 2011
Detecting an undefined object in JavaScript
typeof allows the identifier to never been declared beforeif (typeof obj == "undefined")instead ofif(obj == null) // will throw an error due to never declared
Wednesday, August 31, 2011
How to stop caching with jQuery ($.get(), $.ajax() etc) and javascript
To make it unique for each passes, we can place in a random number behind the url as shown below
$.get('remoteUrl.do?'+Math.random()+, function(data){ $('#msg'+id).html(data);}, 'html');
Set cache:false
$.ajax({ url: 'remoteUrl.do', cache: false, success: function(data){ $('#resultDiv').append(data); } }); $.ajaxSetup({ cache: false});Disable caching using html meta tag:
org.hibernate.PropertyAccessException
Wednesday, July 13, 2011
Tomcat - JDBC driver unregisted when the web application stops
Solution:
Tuesday, June 29, 2010
Glassfish v2( JDBC Connection Pool, JNDI)
Place database driver in glassfish lib dir. (e.g. lib/mysql-jdbc-5.1.11.jar) and restart server.
Step 2:
Login to Admin Console: http:\\localhost:4848\
Goto Resource > JDBC > Connection Pool
Provide Name, Select Database vendor and Select Resource Type
Step 3:
Enter DataSource class name (Database driver)
Change other settings as you want
Save and Ping
:) "Ping Succeed"
Connection Pool is ready
Thursday, May 27, 2010
Converter - Convert MS Word/Excel to PDF
Converts MS Excel Spreadsheet to PDF, image etc
Supported formats, MS Word, Excel, Powerpoint, Txt, Csv, Flash, ODT, RTF, PDF.. etc.
Here is the code:
long startTime1 = System.currentTimeMillis();
// connect to an OpenOffice.org instance running on port 8100
OpenOfficeConnection connection = new SocketOpenOfficeConnection(SocketOpenOfficeConnection.DEFAULT_PORT);
connection.connect();
DocumentConverter converter1 = new OpenOfficeDocumentConverter(connection);
File inputFile = new File("C:\\Miral\\temp\\myDocument.doc"));
File outputFile = new File("C:\\Miral\\temp\\myPortDocument.pdf");
totalFileSize+=(inputFile.length()/1024*100000)/100000;
converter1.convert(inputFile, outputFile);
System.out.println("Total File Size(kb): "+totalFileSize);
long endTime1 = System.currentTimeMillis();
System.out.println("Conversion Time: "+(endTime1-startTime1));
// close the connection
connection.disconnect();