0

I use myeclipse to run my servlet. In doPost function, there is one sentence Tidy tidy = new Tidy(); However, when I run my servlet, I get the error like this:

java.lang.ClassNotFoundException: org.w3c.tidy.Tidy

I have already done this import org.w3c.tidy.Tidy;

Why this error pops out? Is it because I need some configuration in web.xml?If so, how can I do this?

CSnerd
  • 2,129
  • 8
  • 22
  • 45

1 Answers1

0

You will need to add the jar containing the Tidy class to the deployment assembly. This can be found by opening the project properties (right click the project and select Properties) and then going to the MyEclipse->Deployment Assembly page as build path entries aren't automatically added (normally, dependencies should be added via the deployment assembly, rather than the Java build path). This is for MyEclipse 2013 and later. For earlier releases, you may need to adjust the deployment preferences (in the project properties, MyEclipse->Web page, Deployment tab).

Tony Weddle
  • 2,081
  • 1
  • 11
  • 15