开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜