i have installed apache tomcat6 for ubuntu 9.04 recenty.But it seems that some API's like servelet and http are not included althogh i have installed openJDK 1.6. somebody advised me to set JAVA_HOME path variable. BUT i am not able to do that and from where to do that. please explain the procedure.
Are you using the ubuntu-provided version ("sudo aptitude install tomcat6") or a version that you downloaded yourself? The ubuntu-provided version should run out of the box - you'll probably have to search for the locations where the different filetypes are buried. They are spread all over the system.
If you've downloaded a version from http://tomcat.apache.org, you've probably unzipped it somewhere and want to run it now. If you allow a shameless plug: Some time ago I've created a tomcat deployment checklist.
In both cases, try
java -version to see what java version is installed. If it's sun-java, you're set. If it's not found,
sudo aptitude install sun-java6-jre . If it's some gcj-related, you're most likely better off to choose the sun version as default. (no pun intended for that project, I've just had way better experience with sun's variant).
sudo update-java-alternatives is your friend in choosing which of the installed jres to choose (
sudo update-java-alternatives -s sun-java6)
If none of these help, please rephrase your question. To me it's not really clear what your exact problem might be. Please tell us, what version of tomcat you use (ubuntu's or a downloaded one?)