Do I need to have java ee sdk installed to use javaee.jar or can I get it seperately and place it in my path?
I am creating servlets but they won't compile because they cannot find the imported class javax.servlet, etc.
You don't need the JEE SDK, nor the javaee.jar file to develop servlets. All jar files you need come with whatever servlet container you're using. E.g., with Tomcat, look in the common/lib directory for files called servlet-api.jar and jsp-api.jar. (The latter is needed only if you're developing JSP tag libraries, not for servlets or servlet filters.)
I am using Tomcat5 on Fedora 11 as a development environment.
When I tried to compile a servlet...I got the error stating that the imported java class javax.servlet, etc could not be found.
I searched the net for this error...and discovered that I would get this if I did not have (for my version) javaee.jar
I tried compiling from both the Tomcat location and just my home projects folder...both with the same results.
I looked all over tomcat for the javaee.jar file...not there.
Would anything else trigger this?
Joined: Mar 22, 2005
Re-read my previous post. It mentions the name(s) of the files you should be looking for.
Joined: Feb 28, 2004
I had to wait to get home before I could check for the jars.
I have [servlet].jar and [jsp].jar files but no servlet-api.jar or jsp-api.jar files.
Can I install them or is there some other process that needs to be done? Or should these work?
If I try to compile a java class that imports javax.servlet.*...I get the error "package javax.servlet does not exist"
I went to the package installer (Fedora 11).
I found some files that seem to contain the jars needed.
I installed them...but they did not get put in the tomcat5 common lib folder.
Instead, I found them here /usr/share/java
The files are tomcat5-servlet-2.4-api.jar and tomcat5-jsp-2.0-api.jar