In this tutorial, we will learn how to create a Java project with Maven, imports it into the Eclipse IDE, and package the Java project into a jar file. Tools used : Maven 3.2.5 (For how to install, click here) Eclipse (Kepler Release) JDK 7 A. Create a Java Project from Maven Template In a terminal (*uix or Mac) or ... Read More »
Installing Apache Maven on Ubuntu & Windows
To install Apache Maven on Ubuntu and Windows machine we need to take the following steps- Download the current stable version of Maven from http://maven.apache.org/download.cgi. Once downloaded follow the istallation steps – Installation Instructions A. Unix-based Operating Systems (Linux, Solaris and Mac OS X) Extract the distribution archive, i.e. apache-maven-3.2.5-bin.tar.gz to the directory you wish to install Maven 3.2.5. These ... Read More »
How to handle jQuery cross domain AJAX request
Cross Domain jQuery AJAX request AJAX Requests are only possible if port, protocol and domain of sender and receiver are equal, means that the following below listed requests won’t work- Requesting https://serverA.com/a.php from http://serverA.com/b.php Requesting http://subdomain.serverA.com from http://serverA.com Requesting http://serverA.com:5000 from http://serverA.com Here in this tutorial we will cover the ways to handle this restriction. First lets look at the ... Read More »
How to handle HTTP error 414 Request-URI Too Long
Typically Web servers set fairly generous limits on length for URL query string e.g. up to 2048 or 4096 characters. While running a web application in Tomcat & HTTP Apache server, we came across a situation where we were asked to handle an extremely long URL query strings. Which was throwing HTTP 414 “Request-URI Too Long” error. For this situation ... Read More »
Install Node.js on an Ubuntu server
Node.js is a Javascript platform for server-side programming that allows users to build network applications quickly. By leveraging Javascript on both the front-end and the back-end, development can be more consistent and be designed within the same system. Install NodeJs We have to use the apt package manager. We should refresh our local package index prior and then install it ... Read More »
MySQL DB import/export through the command line
MySQL is an open source database management software that helps users store, organize, and retrieve data. It is a very powerful program with a lot of flexibility—this tutorial will provide the simplest introduction to MySQL. Moving MySQL database is a frequent necessity. Servers migration/ disk space runs out etc are the main reasons where we need to migrate mysql database. ... Read More »
MySQL Tutorial Install Access Create and Delete Database
MySQL is an open source database management software that helps users store, organize, and retrieve data. It is a very powerful program with a lot of flexibility—this tutorial will provide the simplest introduction to MySQL How to Install MySQL on Ubuntu and CentOS If you don’t have MySQL installed on your droplet, you can quickly download it. Ubuntu: sudo apt-get ... Read More »
Create a New User and Grant Permissions in MySQL
MySQL is an open source database management software that helps users store, organize, and later retrieve data. This tutorial will give a short overview of options to grant specific users nuanced permissions within the tables and databases. How to Create a New User in MySQL Let’s start by making a new user within the MySQL shell: CREATE USER 'newuser'@'localhost' IDENTIFIED ... Read More »
Java HttpServletRequest get current URL in browsers URL bar
If your current request is coming from an “inside the app-server” forward or include, the app-server is expected to preserve request information as request attributes. The specific attributes, and what they contain, depends on whether you’re doing a forward or an include. For, the original parent URL will be returned by request.getRequestURL(), and information about the included page will be ... Read More »
How MongoDB Journaling Works
MongoDB uses write ahead logging to an on-disk journal to guarantee write operation durability and to provide crash resiliency. Before applying a change to the data files, MongoDB writes the change operation to the journal. If MongoDB should terminate or encounter an error before it can write the changes from the journal to the data files, MongoDB can re-apply the ... Read More »
Jkoder.com Tutorials, Tips and interview questions for Java, J2EE, Android, Spring, Hibernate, Javascript and other languages for software developers