Skip to main content

Uploading files on Remote Server using Spring 3.x


$(document).ready(function() { $("#quoteCount").keydown(function(event) { if ( event.keyCode == 46 || event.keyCode == 8 ) { // Allow only backspace and delete // let it happen, don't do anything } else { if (event.keyCode < 48 || event.keyCode > 57 ) { // Ensure that it is a number and stop the keypress event.preventDefault(); } } }); });

Comments

Popular posts from this blog

Creating Pdf in multiple Languages in Java

Creating Pdf in multiple Languages in Java This code demonstrate how to create pdf in multiple languages in java by using ITEXT pdf creator. To use this sample code download itext.jar To display different locale on pdf you need to download font known as Arialuni.ttf and added to the project Most important thing is the encoding part set encoding to "Identity-H" (String encoding = "Identity-H";) as well as create font for the same to take effect in pdf create font (Font fontNormal = FontFactory.getFont(("c:/windows/fonts/arialuni.ttf"), encoding,BaseFont.EMBEDDED, 8, Font.NORMAL);) You can download the source code from here import java.io.FileOutputStream; import com.lowagie.text.Chunk; import com.lowagie.text.Document; import com.lowagie.text.Font; import com.lowagie.text.FontFactory; import com.lowagie.text.HeaderFooter; import com.lowagie.text.Paragraph; import com.lowagie.text.Phrase; import com.lowagie.text.pdf....

Basic Java Interview Questions

1. Why java does not support multiple inheritance ? Answer :- To say why java doesn't support inheritance directly like c++ should be the diamond problem faced by c++,(Diamond problem is an ambiguity that arises when two classes B and C inherit from A, and class D inherits from both B and C. If a method in D calls a method defined in A (and does not override it), and B and C have overridden this method differently, then via which class does it inherit: B, or C?) 2. JVM crash is an Error or Exception.? Answer:- JVM crash is an Error as a normal developer as we cannot handle it, but its exception for JVM developer as they can fix it. 3. Print “Hello World!” Without Main Method in Java? Answer:- public class Testing {    static    {        System.out.println("Hello World");    }    public static void main(String[] args)    {    } } ...

Spring Dependency Injection Sample code

Dependency Injection(DI) in Spring What do you mean by Dependency injection? Answer : Inject Dependencies at runtime. Container inject dependencies of component by setting implementation object. Dependency Injection can be of two types.      1. Constructor Based.      2. Setter Based. To Implement this loose coupled code you need to have spring.jar, log4j.jar and common-logging.jar configured to your buildpath. Please follow the project structure to setup your project as shown in the image below.