views:

315

answers:

2

I'm trying to write a simple java applet program, but it seems that I'm missing the javax.servlet.* class definitions.

Using:

  1. apple snow
  2. eclipse Java EE ide

Do I need to add a specific JAR file to my project and if so, which one?

I have Macports installed in case something from the ports might be helpful.

A: 

Thank for all of your helpful comments. I installed tomcat 6 and it contains the missing jar in order to compile the project.

Nice plug-in to load tomcat applications :

Sysdeo Eclipse Tomcat Launcher plugin - http://www.eclipsetotale.com/tomcatPlugin.html

Using Netbeans i was able to properly compile tomcat applications just by creating a new java web application. for now i'll stick to netbeans, it also has a nice gui for connecting to the server and seeing the installed applications and their status.

ufk
+2  A: 

This is all result of misconceptions (Applets have nothing to do with the actual problem) and ignorance about Eclipse (if offers builtin ways to seamlessly integrate and link the one and the other, the Java EE variant has already a Tomcat plugin, you just have to integrate the server and associate it with the web project).

In the future you should be more precise and detailed about the problem (and thus not telling like "...it seems that..."). Post the relevant code snippet which caused the problem. Post the actual error message (with stacktrace, if any). Post the steps to accomplish to reproduce the problem. Also see: How To Ask Questions The Smart Way.

I've answered several times before how to get started with Eclipse+Tomcat+Servlets, you may find it useful as well:

BalusC
the problem was that i was pretty lost on that subject and that's why i could not give more information or even an accurate information. thanks for providing all the relevant details for me to better understand how things work.
ufk