• Enter Slide 1 Title Here

    This is slide 1 description. Go to Edit HTML of your blogger blog. Find these sentences. You can replace these sentences with your own words.

  • Enter Slide 2 Title Here

    This is slide 2 description. Go to Edit HTML of your blogger blog. Find these sentences. You can replace these sentences with your own words.

  • Enter Slide 3 Title Here

    This is slide 3 description. Go to Edit HTML of your blogger blog. Find these sentences. You can replace these sentences with your own words.

Wednesday, March 28, 2007

[JSTL] According to TLD or attribute directive in tag file, attribute items does not accept any expressions

Error Message: According to TLD or attribute directive in tag file, attribute items does not accept any expressions. When working on a J2EE (Java Enterprise Edition) web application with JSTL (JSP Standard Tag Library), this is a pretty common error.

Reason for this error is version incompatibility between JSP, Servlet and JSTL. Matching versions are listed below.
  • JSP 1.2 , Servlet 2.3 , JSTL 1.0
  • JSP 2.0 , Servlet 2.4 , JSTL 1.1

Check the web.xml to see whether it uses the Servlet 2.3 DTD or Servlet 2.4 Schema.

If it uses Servlet 2.3 DTD, it will have the following text.
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
.....
</web-app>

For Servlet 2.4 Schema, it will look like below.
<web-app version="2.4" 
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
.....
</web-app>

When you change the versions correctly, no such errors will pop-up. Hope this will help you.

Wednesday, March 21, 2007

A child born, two years after his father's death

According to your maths, above subject would not be correct. But that has happened in Texas. As CNN reports, the little boy's name is Benton Smith and his brave and courageous mom is Kathleen Smith while father was Brian.

Brian, who was a solder in US army has gone for Iraq in 2004, and died there in July - 2004. But his wife has given birth to a boy in July, 2006. This has happened because Brian had donated his sperm so Kathleen could keep trying to have a baby while he was in Iraq.

Congratulations Kathleen. You are a great mom and a great wife.

Read more at CNN.com

Monday, March 19, 2007

[Cricket] World record - Six sixes in one over

Herschelle Gibbs, 34 yrs South African right hand batsman made a big record on 2007-03-16. He did this against a leg-spinner, Daan van Bunge of Netherlands in the 30th over.

This is where those bullets went.
29.1 : long on
29.2 : long off
29.3 : long on
29.4 : deep midwicket
29.5 : wide long off
29.6 : deep midwicket
Gibbs got 72 off 40 balls with 7 sixes before Van Bunge caught him in the next over at long on.

West Indies great Sir Garfield Sobers and India's Ravi Shastri had done this six sixes in one over during first-class matches. But this is the first time in an international match.

Congratulations Gibbs.

Related:
World record test cricket partnership

Friday, March 16, 2007

Decipher the code to check your eyes

Try to read the following code. Even though this image looks like an ordinary one, it has a hidden message. But you won't be able to read it if you have good eyes.


Couldn't you read that? You can see the answer below but try it again if you could not. Don't directly go and see the answer. Don't show that you have bad eyes. Try again.

To see the answer click here.


Tuesday, March 13, 2007

Cartridge World operations automated using NetSuite - With my implementations

Today is a pretty happy day in my life as one of the projects implemented by me has received a good reputation with this article by Yahoo! Finance.

Basically the requirement was to integrate two systems, so that Cartridge World can use the full blown features of NetSuite. This integration is implemented by me with the coordination and help of my CEO and other members at Celigo Technologies. I'm proud to be part of a success story.

Cartridge World, is a world's fastest growing ink refilling retailer in printer cartridge industry. NetSuite, is a leader in on-demand business software suites. Cartridge World wanted to use NetSuite system to automate their e-commerce operations and it is implemented throw integrations with Java. The article shows how far the project succeeded.

Tuesday, January 9, 2007

Eclipse - cvc-elt.1: Cannot find the declaration of element error

When working with XML files in Eclipse, a common error developers encounter is;
cvc-elt.1: Cannot find the declaration of element "some-element-name".


The error message gives a clue on which file the error exists by pointing to the element name, but does not give any information on why this error is shown or how it could be fixed. Given error is generated if parser could not find any specification on the given elements when Eclipse tries to parse the XML file using Xerces XML parser. To over come the error, XML file must be provided with a specification (a schema file or a DTD file).

Examples of such files may look like below.
<!DOCTYPE mule-configuration PUBLIC "-//Comp //DTD configuration XML V1.0//EN" 
"http://www.comp.com/dtds/proj/project-configuration.dtd">

or

<element 
xmlns="http://www.comp.com/schema/element"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.comp.com/schema/element
http://www.comp.com/schema/element/elements-1.0.xsd">

Hope this tip would help you.

Wednesday, January 3, 2007

Patent damages tripled in 2006


Trend of Patent lawsuits are increasing drametically. According to sources, the total amount awarded in 2006 is $1 billion. Compared to $379 million which was awarded in 2005, this is almost a threefold increase.

The top winner of the year was Rambus who won the case over Hynix Semiconductor with $307 million. Rambus has a ton of patents on their list.

Even though there are pros/cons on having the patent concept, it seems companies are willing to goto courts to protect their technologies while few companies do it for the sake of grabbing some money from a company who misuses a technology or concept.

Tuesday, January 2, 2007

Gmail hacked? All contacts and messages deleted in some accounts

Recently some gmail users made complains saying all their mails and contacts were automatically deleted from their mail accounts.


And this was first reported on 19-12-2006 saying "Lost Everything in My Account..email,contacts,sent mail..". It further explained the issue as;
Found my account clean..nothing in Inbox, contacts ,sent mail..How can all these information residing in different folders disappear? ..How to write to gmail help team to restore the account..is it possible? ..Where to report this abuse?.

This message received so many replies saying others also faced the issue. But one important point came up there was that they were using Firefox 2.0.

Another user pointed out that the following message was left after deleting all the mails.
"This is not a mistake. All your emails and contacts have been deleted
on purpose. This was a malicious attack and not an error. Have a nice
day. =)"


People who got attacked had kept the Gmail opened under Firefox 2.0. I was also used to keep my Gmail opened under Firefox 1.5 (not 2.0) and fortunately I was not caught to the attack.

Monday, January 1, 2007

Blessings for a very happy new year 2007



I wish you Health...
So you may enjoy each day in comfort.

I wish you the Love of friends and family...
And Peace within your heart.

I wish you the Beauty of nature...
That you may enjoy the work of God.

I wish you Wisdom to choose priorities...
For those things that really matter in life.

I wish you Generousity so you may share...
All good things that come to you.

I wish you Happiness and Joy...
And Blessings for the New Year.

I wish you the best of everything...
That you so well deserve.

Happy New Year!


(Author unknown, if you do let me know).

Thursday, December 28, 2006

The input line is too long - Windows command line error

Today I wanted to run the bat file shown below to run a java program. This file is mainly used to set the classpath as you can see below.

@echo off
setlocal

set BROKER_HOME=C:/Documents and Settings/user/workspace/myProject

set CP=%BROKER_HOME%/out/lib/activation-1.0.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/activeio-2.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/axis.jar;%CP%
set CP=%BROKER_HOME%/out/lib/axis.ns.jar;%CP%
set CP=%BROKER_HOME%/out/lib/axis.org.jar;%CP%
set CP=%BROKER_HOME%/out/lib/axis-ant.jar;%CP%
set CP=%BROKER_HOME%/out/lib/connector.jar;%CP%
set CP=%BROKER_HOME%/out/lib/csv.jar;%CP%
set CP=%BROKER_HOME%/out/lib/csvman.jar;%CP%
set CP=%BROKER_HOME%/out/lib/jakarta-oro-2.0.8.jar;%CP%
set CP=%BROKER_HOME%/out/lib/jaxrpc.jar;%CP%
set CP=%BROKER_HOME%/out/lib/jmxri-1.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/jmxtools-1.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/log4j-1.2.8.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mail.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/backport-util-concurrent-3.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-beanutils-1.7.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-codec-1.3.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-collections-3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-digester-1.7.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-discovery-0.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-httpclient-3.0.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-jxpath-1.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-logging-1.0.4.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-net-1.4.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-pool-1.3.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/dom4j-1.4.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/jug-2.0.0-asl.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-core-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-acegi-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-builders-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-client-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-management-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-ognl-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-pgp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-scripting-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-spring-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-xml-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-ejb-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-email-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-file-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-ftp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-http-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-jbi-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-jdbc-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-jms-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-multicast-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-quartz-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-rmi-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-soap-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-ssl-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-stream-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-tcp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-udp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-vm-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-xfire-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-xmpp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mx4j-impl-2.1.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mx4j-jmx-2.1.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mx4j-remote-2.1.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mx4j-tools-2.1.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/ognl-2.6.9.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/xpp3_min-1.1.3.4.O.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/xstream-1.2.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/commons-attributes-api-2.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/commons-dbutils-1.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/commons-io-1.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/commons-lang-2.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/geronimo-j2ee-connector_1.5_spec-1.0.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/geronimo-jta_1.0.1B_spec-1.0.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/netsuite-2.0.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/ojdbc14.jar;%CP%
set CP=%BROKER_HOME%/out/lib/quartz-1.4.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/saaj.jar;%CP%
set CP=%BROKER_HOME%/out/lib/spring-beans.jar;%CP%
set CP=%BROKER_HOME%/out/lib/spring-context.jar;%CP%
set CP=%BROKER_HOME%/out/lib/spring-core.jar;%CP%
set CP=%BROKER_HOME%/out/lib/wsdl4j-1.5.1.jar;%CP%
set CP=%BROKER_HOME%/out/conf;%CP%
set CP=%BROKER_HOME%/lib/commons-dbutils-1.0.jar;%CP%
set CP=./;%CP%
set CP="%CP%"

ECHO Using Classpath:
ECHO %CP%

cd ..

java -classpath %CP% com.mycompany.myproject.Client

An error message resulted saying "Input line is too long" as shown in the image. This is not an error in the java program which you would guess first.



I have set up a variable for classpath which makes my command too lengthy. This message pops up since the command is too long for the Windows® command line environment to handle.

The number of characters that can be entered into a single command is limited to 8191. (this is including spaces).

For example total number of charaters in the below command is 42.
C:\>javac -classpath myclasses.jar Client.java

There was no solution to the issue other than somehow making the classpath shorter by moving the jar files into a folder like "C:\jars".

Do you have any other solutions for this issue?

Thursday, December 21, 2006

Margin Vs Padding - CSS Properties


CSS provides two properties named margin and padding for keeping space between HTML Box type elements. But why do we have two properties for the same reason? Are they similar?
No. They have a main difference.
Padding - defines space between border and element content
Margin - defines space between border and other outer elements
(Look at the above diagram)

So when elements needs space between them, better to use margins. When text or an inner element needs space between the parent box and itself go for paddings.

Look at this example for visual clarification generated with this code.
<div style="margin:25px; background:#cccccc; border:#000000 2px dashed;">
Text inside element
</div>
<div style="padding:25px; background:#cccccc; border:#000000 2px dashed;">
Text inside element
</div>


Text inside element

Text inside element



In the first <div>, space is set between the border and outside elements but in the second one it is between the boder and text.

Hope this will help.