Category Archives: Uncategorized

Map in Javascript

Source : http://www.coderanch.com/t/121097/HTML-JavaScript/Map-Javascript Map in Javascript var output = {}; Sort of. That just creates an empty instance of a JavaScript Object. It’s identical to: var output = new Object(); There really isn’t any implementation of Map in JavaScript. But… … Continue reading

Posted in Uncategorized | Leave a comment

Internationalization tips — I/O operations

I/O Operations Whenever text is being read from / written to a file, the encoding should be specified. (Preferably as UTF-8 but need to keep in mind the OS / Language / Locale) try { FileOutputStream fos = new FileOutputStream(“test.txt”); … Continue reading

Posted in Uncategorized | Leave a comment

Internationalization tips for XML

In order for the XML to support Unicode, the following statement needs to be mentioned at the start of the XML: Apart from these there is BOM issue while saving the XMLs with Unicode characters. Many Windows based text editors … Continue reading

Posted in Uncategorized | Leave a comment

Forcing SaveAs using the HTTP header

Forcing SaveAs using the HTTP header In order to force the browser to show SaveAs dialog when clicking a hyperlink you have to include the following header in HTTP response of the file to be downloaded: Content-Disposition: attachment; filename= Where … Continue reading

Posted in Uncategorized | 2 Comments

To Upload and insert the file into Database with Current Date and Time In JSP

Source : http://www.roseindia.net/jsp/fileupload.shtml In this tutorial, you will learn how to upload a file through JSP and insert it into the database. For this, we have created two jsp pages page.jsp and upload_page.jsp. The page.jsp is created for presentation where … Continue reading

Posted in Uncategorized | Leave a comment

The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

The jsp page gives the following error : The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application Even if you include this: in your jsp page, it still gives the error. … Continue reading

Posted in Uncategorized | 2 Comments

java.lang.UnsupportedClassVersionError: Bad version number in .class file

java.lang.UnsupportedClassVersionError: Bad version number in .class file [at java.lang.ClassLoader.defineClass1(Native Method)] is an error that you may face in running a compiled java class file. So as you can see from the stack trace, a class has not been loaded. But … Continue reading

Posted in Uncategorized | 2 Comments