开发者

Java EE noob question - using additional modules

I have what I think is a really simple question, but I could开发者_StackOverflow社区n't find the answer after two hours looking for it (maybe I don't know how to search, but I promise I am desperate by now...).

The thing is that I have to compile an application which uses javax.servlet.http classes, and the compiler can't find the mentioned package (it does find other javax packages but not that one). After some time researching, I realized that servlets are not included under the standard JavaSE SDK, but they are in JavaEE. So I downloaded JavaEE (it came with glassfish), installed it, and changed system path to point to glassfish folder/jdk/ instead of my previous installation.

However, the compiler still couldn't find the classes, so I continued investigating, and saw that additional JavaEE jars are in a different folder: glassfish/modules or something like that... So I added it to the path. However, it didn't solve anything.

The only solution I can now think of is manually copying the servlet jar into my project/lib folder, however, the compilation should work as is (it worked as is for people that were involved in the project previously than me), so I'd like to look for a solution that made javac detect automatically the damm JavaEE modules... If someone could help me with this he/she'd really be my saviour! :D

Thanks and regards, pepillo


and changed system path to point to glassfish folder/jdk/ instead of my previous installation.

You don't need to do this.

Just provide servlet-api.jar to your app's classpath

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜