JSP programming on Ubuntu with Tomcat 5.5

I am working on a few assignment for my MCA course and installed Tomcat on Ubuntu through the official repositories. However I had some trouble getting it to work and finally this guide worked.

Actually what we need to do is add this line to ~/.bashrc
export CLASSPATH=$CLASSPATH:/usr/share/java/jsp-api-2.0.jar:/usr/share/java/jsp-api.jar:/usr/share/java/servlet-api-2.4.jar:/usr/share/java/servlet-api.jar

You may also need to set permissions to enable normal users to write to /usr/share/tomcat5.5/webapps . Or just add the current user to the adm group.