开发者

What's the problem with these imports?

开发者 https://www.devze.com 2023-04-05 03:21 出处:网络
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 doe

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

精彩评论

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