What's the problem with these imports?
I'm getting these errors when trying to build the projects:
F:\Sistemas\Java\PDA\src\java\br\inf\ibs\mentawai\consequence\TypeConsequence开发者_开发技巧.java:10: package javax.servlet does not exist
import javax.servlet.RequestDispatcher;
F:\Sistemas\Java\PDA\src\java\br\inf\ibs\mentawai\consequence\TypeConsequence.java:11: package javax.servlet does not exist
import javax.servlet.ServletContext;
It means that servlet.jar isn't in your classpath, basically... I haven't used NetBeans myself, so I don't know how you tell it about libraries - but you need to do so :)
If you are running a web application, make sure that you have a server defined, the server provides those classes, however if you do not have a web application and you are just trying to compile a library that uses those classes, then you need to manually add the library to your project as jon suggested.
精彩评论