aspose file tools*
The moose likes Testing and the fly likes test cases for a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "test cases for a servlet" Watch "test cases for a servlet" New topic
Author

test cases for a servlet

Mona Gadkari
Ranch Hand

Joined: Jul 28, 2003
Posts: 64
hello

i am rather new to using junit
my problem is .....

my simple test cases execute properly but when i write testcases for servlet i get an exception, however the servlet compiles well

junit's testrunner throw this exception

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass0(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)
at com.rovingplanet.xml.XmlHandler.<clinit>(XmlHandler.java:29)
at com.rovingplanet.web.servlet.TestCM.setUp(TestCM.java:51)


Mona(Varijasmom)
Mona Gadkari
Ranch Hand

Joined: Jul 28, 2003
Posts: 64
i found the solution
Mona Gadkari
Ranch Hand

Joined: Jul 28, 2003
Posts: 64
i got it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: test cases for a servlet