when i am compiling my program i got .class file.but when i am try to run it it shows the error like Exception in thread "main" java.lang.NoClassDefFoundError: InsertServlet how can we resolve this. and what can we type in the url path of the tomcat to see the output
Do the servlet mapping of your servlet in web.xml like this:
<servlet> <servlet-name>InsertServlet</servlet-name> <servlet-class>InsertServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>InsertServlet</servlet-name> <url-pattern>/InsertServlet</url-pattern> </servlet-mapping>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.