Characters Count

Problem: Suppose you are given a collection of strings like [swquiz,gkhive,testdriven ]. Each string shall have characters from ‘a’ to ‘z’, only lower case, there can be repetition of characters in a given string. Write a program for following 1) Count of characters that are available in all the input strings 2) Count of characters [...]
Continue reading…

 

Downloading all maven dependencies to a directory

Use case: Tired of having unwanted jars? Tired of finding dependent jars? Maven shall help to download all the dependencies of the project into a folder. Solution: If you already have a pom.xml execute command “mvn dependency:copy-dependencies” and you will find target/dependencies folder filled with all the dependencies. Else you can create simple pom.xml

Continue reading…

 

Tomcat and Apache Web Server Integration with mod_proxy connector

Use case: I have only one public IP assigned to my hosting/private cloud, and I want to host multiple websites on a single machine. Scenario as given below. Site can be simple html or php or JSP/Servlet (Java). Prerequisites: Java, Tomcat, Apache, PHP installed. Steps to integrate Tomcat and Apache: Enable mod_proxy, mod_proxy_http, mod_proxy_ajp Configure virtual [...]
Continue reading…