Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not able to compile servlets in Eclipse :(

 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am not able to compile servlets using Eclipse3.1

I am getting an error message- "Import not resolved?"

How do i handle this ? and also how do i link the three .jar files servlet-api.jar , jsp-api.jar to Eclipse environment ?

I mean, the way we set the parhs for these files in Windows Control Panel-Environment Variables...how do i do it in Eclipse???

in Eclipse..i clicked on Window-Preferences. i didnt find any Tomcat tab in the prefernces. does that mean that my eclipse doesnt support building and compiling servlets.

please help me out.

thanks in advance
niranjan
 
Radhika Gokhale
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Niranjan,

You need to add the jars which are required for your servlet compilation to your eclipse project by selecting Project->Properties->Java Build Path-> Add jars or Add External Jars.

This works for me.

Regards,
Radhika
 
Frederic Esnault
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should NOT use Eclipse for your SCWCD preparation.
You are required to know the API, return types, parameters and thrown exceptions, how to build DD, and so on.

For SCWCD preparation, what you can use is a simple text editor, with no Java functionality like completion, automatic WAR creation, TLD files wizards, or anything else.

Use text editor, command line, java, and servlet, jsp and jstl jars.
You also must know classpath, etc...

Trust me, don't use eclipse. IT's a wonderful dev env, but for your actual goal, it would hurt you instead of helping.
 
Peter Sin
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use WSAD/Eclipse for compilation purpose only. Everythings in JSP, Servlet, Web.xml etc are typed by hand. It is good for syntax checking. Hope this help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic