On 1/31/06, DEEPA M N <[EMAIL PROTECTED]> wrote: > Hi > I did as u said. This is wat the error i m getting. > > > D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes>java > com.deepa.servlet.DownloadFiles > Exception in thread "main" java.lang.NoClassDefFoundError: > com/deepa/servlet/DownloadFiles (wrong name: DownloadFiles) > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(Unknown Source) > at java.security.SecureClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.access$100(Unknown Source) > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClassInternal(Unknown Source) >
This means that the class is not in the correct package. Put the following line as the first line in the file DownloadFiles.java package com.deepa.servlet; > > > D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes\com\deepa\servlet>java > DownloadFiles > Exception in thread "main" java.lang.NoClassDefFoundError: > javax/servlet/http/HttpServlet > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(Unknown Source) > at java.security.SecureClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.defineClass(Unknown Source) > at java.net.URLClassLoader.access$100(Unknown Source) > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClassInternal(Unknown Source) > > Thank u > > > Anto Paul <[EMAIL PROTECTED]> wrote: > In what package it is defined ?. > Are you sure you deleted the old classfiles and compiled the > classfiles to the right folder ? > Go to WEB-INF\classes and type java com.deepa.servlet.DownloadFiles. > Go to classes com/deepa/servlet and type java DownloadFiles. > > It should give the same error since it is not in the right > package/directory structure. > > > > > > --------------------------------- > Jiyo cricket on Yahoo! India cricket > -- rgds Anto Paul --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]