Friday, February 24, 2017

How to get file name without extension from a file name

 String fileName = "jasmine.jpeg";
        String fileNameWithoutExtension = fileName.split("\\.")[0];
        String extension = fileName.split("\\.")[1];
        System.out.println("File Name Without Extension:    "+fileNameWithoutExtension);
       System.out.println("Extension:   "+extension);
    

How to get file extension from a file name

 String fileName = "jasmine.jpeg";
        String fileNameWithoutExtension = fileName.split("\\.")[0];
        String extension = fileName.split("\\.")[1];
        System.out.println("File Name Without Extension:    "+fileNameWithoutExtension);
       System.out.println("Extension:   "+extension);
    

Where should custom sql in Liferay go in a maven build?

It should be under src/main/resources/custom-sql/default.xml because custom-sql/default.xml will come under web-inf/classes folder of project