Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error running JSP  RSS feed

 
Andrew McLaren
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to get a little JSP application set up, and I am having a problem. I have a button that executes (right word?) a java file. Or at least, it's supposed to. Instead, I get this error:

javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException
com.crn.hcsc.CRNSignon.doGet(CRNSignon.java:13)


I understand that in theory that means that my container can't fine that class. But if I look in my WEB-INF/lib folder, there it is, big as life:
crn\WEB-INF\lib\javax\xml\rpc

To add further confusion, everything works fine if I run this as a straight java application.

So confused...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the lib directory is for jar files.
Put the classes under WEB-INF/classes/{package}/{classes}
 
Andrew McLaren
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hooray!
That worked, thanks so much for the quick reply. Wierd part is, I didn't put those class files in there, not entirely sure how they got there to start with, but it works now.

Peace

Andrew
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!