serving the solutions day and night

Pages

Sunday, February 27, 2011

Checkstyle 5.3

  1. CheckStyle is a tool to help programmers to write JAVA coding standard.
  2. Download and unzip checkstyle-5.3 into a convenient directory.
  3. It is a program to inspect your JAVA source code and list/point out errors that deviate from a defined set of JAVA coding standard.
  4. By default it supports the Sun JAVA Code Conventions (sun_checks.xml), and also support any customize coding standard.
  5. It can be invoked with an ANT task, a command line program and integrated into IDE (Eclipse, IntelliJ, NetBeans) and other tools (TextPad).

Sunday, February 20, 2011

Eclipse and Tomcat Confirguration, Create War.

1)Download and extract Eclipse IDE for Java EE Developers

2)Download and extract or install Apache Tomcat

3)Open your browser, type http://localhost:8080 and verify tomcat is running.


Sunday, February 13, 2011

Java Servlet CRON job through Tomcat

Apache Tomcat server won't support to run servelt automatically (Resin will support through <run-at> tag). So i created time scheduler job to perform cron job through Tomcat.

1) Create Schedular Servelt
package com.dns.blog;

import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
/**
* Parser Schedular to run every one hour to parse the file.
*
* @author Daynight
* @version 1.0 02/23/2011
*/