Deployed a “war” file on Tomcat, and hits following error messages :
Run a “jar” on Debian 7.5, and hits the following error messages :
A collection with NumberLong type data as follows :
On Linux, gzip is unable to compress a folder, it used to compress a single file only. To compress a folder, you should use tar + gzip, which is tar -z.
Dual boot Windows and Ubuntu, but Ubuntu is unable to access the Windows partition /dev/sdb3, shows the following error message :
This article shows you 2 ways to export a MongoDB “aggregation” result into another new collection.
In this article, we will show you how to find out which JRE / JDK or JAVA_HOME is used by the Tomcat container.
The current environment is using Tomcat 7 + JDK 6. How to configure Tomcat to use JDK 7?
By default, Tomcat’s manager webapp is able to access via yourapp:8080/manager. It is a good practice to change the default /manager to something else, to avoid potential brute force attack.
In this tutorial, we will show you how to read a file from a resources folder or classpath, in both runtime and unit test environment. Try putting a file into the src/main/resources folder, and read the file with following code snippets :
This example shows you how to use jsoup to send a search query to Google.
Recently, many referer spam hit on my server, below is the command I used to find and count the IP Address from a Nginx access log file.
In Nginx, you can block certain user agents (normally it is crawler) like this :
Normally, we are using the following ways to generate a random number in Java.
This tutorial shows you how to configure Nginx as a reverse proxy to redirect the traffics from port 80 to Apache Tomcat on port 8080.