If you want to work with Comma-separated Files (CSV) in Java, here’s a quick API for you.
As Java doesn’t support parsing of CSV files natively, we have to rely on third party library. Opencsv is one of the best library available for this purpose. It’s open source and is shipped with Ap
[ read more ]
It's a simple way to load ImageView with a bitmap from internet, via http connection.
In order to load something from internet, the AndroidManifest.xml have to be modified to grand permission for internet access.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http:
[ read more ]
Struts 2 Interceptors: Basics
Struts2 provides very powerful mechanism of controlling a request using Interceptors. Interceptors are responsible for most of the request processing. They are invoked by the controller before and after invoking action, thus they sits between the controller and action.
[ read more ]
Introduction to Tiles 2
Nowadays, website are generally divided into pieces of reusable template that are being rendered among different web pages. For example a site containing header, footer, menu etc. This items remains same through out the website and give it a common look and feel. It is very
[ read more ]
Introduction to Struts2 Validation Framework
Struts Action 2 relies on a validation framework provided by XWork to enable the application of input validation rules to your Actions before they are executed. Struts2 Validation Framework allows us to separate the validation logic from actual Java/JSP
[ read more ]
Struts 2 Tiles Plugin Tutorial with Example in Eclipse
Welcome to Part-4 of the 7-part series where we will go through different aspects for Struts2 Framework with some useful examples. In previous part we went through Struts2 Validation Framework. We saw how easy it is to integrate validation in y
[ read more ]
This document takes you through the basics of using NetBeans IDE to develop web applications using the Struts web framework. Struts is an open source framework that extends the Java Servlet API and employs a Model, View, Controller (MVC) architecture. It enables you to create maintainable, extensi
[ read more ]
This post is the continuation of my previous last post, I had explained how to create a basic RESTful web services API using Java, now I want to explain JSON transformer to work with input Get and Post methods parameters. Just added a new class called transformer it converts object data into JSO
[ read more ]
An example on getting and printing a string from system clipboard in Java in just 2 statements.
Example
import java.awt.*;
import java.awt.datatransfer.*;
class SystemClipboard
{
public static void main(String args[]) throws Exception
{
// Create a Clipboard object using get
[ read more ]
An example on pasting an image that is on system clipboard in Java on a JFrame. Here we've used a JLabel and set the image from the clipboard to it as icon.
Example
// Import for BorderLayout
import java.awt.*;
// Import for JFrame, JLabel
import javax.swing.*;
// Import for Clip
[ read more ]