Validating Web.xml file

While working with java web application development often we need to install applications again and again on web server / application server. And often when we deploy application after modification to web.xml application fails to get deployed giving long error in Tomcat ( or any other server) console.

To check validation of web.xml before deploying we can validate it with standard web.xml dtd

I used ant to handle deployment / stopping / starting application in tomcat.

You can use the following ant task to check validation of web.xml

 

<target name="checkwebxml" description="Validate the web xml">

<xmlvalidate failonerror="yes" lenient="yes" warn="yes" file="./web/WEB-INF/web.xml">

<dtd publicId="-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"

location="web-app_3_0.dtd"/>

</xmlvalidate>

</target>

 

You can make compilation target dependent on checkwebxml task so that compilation and deployment doesn't starts before validation of web.xml

This will ease our task to find error in tomcat console when we try to deploy our application

UPSC Civil services 2011 Preliminary Exam Paper 2 Answers

UPSC 2011 Civil Services Preliminary Exam Analysis

Just came after giving exam for UPSC Civils 2011

Here are my personal thoughts ( PS : I am not any expert , there are just my own views)

Paper 1

Total questions were 100 , time was 2 hours

Gone are those days when exams were full of Indian history , i feel UPSC has moved on and now they are testing us for current events. People who read papers like The Hindu and Frontline magazine should feel they are on right track to prepare for exam like this. Paper was logical and nothing like what happened in year xxxx bla bla types questions.

Current affairs , geography , economics topics of inflation and banking were tested often.

Paper 2

Total questions were 80 , time was 2 hours

It was exam with lots of English questions . Frankly i was astonished to see so many English passages. I don’t know what was in paper setters mind.

8 questions in the end which didn’t not have negative marking were testing Decision making skills

Maths questions were typical RS agarwal types , you just need to brush up few formulas to solve them

 

What will be my score ?

Seriously i don’t know , exam would be high scoring i feel. People who are preparing for it religiously for this since long would easily crack it.

What are your thoughts? Please post

Excel cell drag plus sign not coming

The explains How to fix the problem when excel cell drag function don’t work or plus sign don’t come when you want to drag the cells in Excel 2010 , 2007 or 2003

All we have to do is to enable one checkbox

  • In Excel 2007: Office Button > Excel Options > Advanced > Editing options: Enable fill handle and cell drag-and-drop
  • In Excel 2003 and earlier: Tools > Options > Edit > Allow cell drag and drop
  • In Excel 2010 Go to File > Options > Advanced > Enable file handle and cell drag-and-drop

Want to see more detailed animation ? Visit the link below

http://reviewofweb.com/how-to/enable-cell-drag-and-drop-excel-2010/

Source code of Java API

To see the source code of Java API the easiest way is to download the corresponding JDK from the Oracle website and follow the steps below.
  • Install the JDK and go to folder where JDK is installed
  • In that folder there would be one zip file named src.zip
  • Extract it and enjoy the source code for Java API

Delhi airport and New Delhi Railway Station

How to go from New Delhi station to International airport or how to go from International airport to New Delhi

To go from New Delhi Metro station to IGI airport Delhi Airport metro Express is the best way ,  it takes about 20 minutes from Delhi Metro station to reach airport. It go to T3 of the airport

The frequency of the train is 20 minutes and it operates from 5 Hrs to 23:00 Hrs (Check latest timings on official website , they can increase running hours)

You can read more about the metro for airport at links below

Delhi Airport Express Home page

Delhi Airport metro express timings Timings and Fare details

 

Delhi airport Terminals

To reach your terminal at International airport from Delhi t3 terminal

Mostly All domestic flights depart from 1D terminal

Terminal 1D : Departure of Indigo , Go Air , Spice

Terminal 1C : Arrival of Go Air , Spice Jet , Indigo

Terminal T3  : International fights , Upper level for Departures , Lower level for Arrivals

A very good list of FAQ about airport is answered here.

To travel from 1D / 1C to T3 the transport is available at airport . Just contact the Inter terminal transport helpdesk.

Setting up EC2 Command Line environment on Windows

This post assumes that you have setup your EC2 account successfully using Amazon Management Console , to obtain Private Key and X502 Certificate. If you are not sure what this mean , just read the other post on getting started with EC2

To setup windows environment for development with Amazon Cloud Computing platform , EC2. We need to follow below steps

  1. Download the command line tools
  2. Setting Up Environment variables and path
  3. Test it

Download

  • Download latest version of JDK from Oracle website
  • Download the latest version of EC2 API tools from Amazon Website

Environment Variables

Set the following environment variables

JAVA_HOME as location to your jdk installation folder (e.g C:\Program Files\Java\jdk1.6.0_25 )

EC2_HOME as location where you unzipped the EC2 API tools ( e.g D:\Development\Tools\ec2-api-tools-1.4.3.0)

EC2_PRIVATE_KEY as location where you stored your private key including name of private key ( e.g D:\Development\Importantcloudfiles\pk.myprivatekey.pem )

EC2_CERT as as location where you stored your cert key including name of cert key (e.g D:\Development\Importantcloudfiles\cert.mycertkey.pem )

Add following information to path variable after the last information present in path variable

;%JAVA_HOME%\bin;%EC2_HOME%\bin

Testing

Open the command prompt and browse to bin folder in EC2 API tools folder

Test by entering following command

ec2-describe-regions

It should show output as below

 

image