javax.servlet.http.*;

Hi everyone,

I am importing this library:

import javax.servlet.http.*;

in a .java, but it does not compile and sends the error:

package javax.servlet.http does not exist

import javax.servlet.http.*;

I have installed the j2sdk1.4.2_11,

what can I do, so the .java compiles correctly?

thanks...

[380 byte] By [deroka] at [2007-11-27 7:54:57]
# 1
javax.servlet.http.* doesn't come with J2SE. It comes with J2EE.
warnerjaa at 2007-7-12 19:36:16 > top of Java-index,Java Essentials,Java Programming...
# 2
thanks for that info,but if have installed the j2sdk1.4.2_11, could I install the J2EE 1.5?orI must install the J2EE 1.4?
deroka at 2007-7-12 19:36:16 > top of Java-index,Java Essentials,Java Programming...
# 3
You can install J2EE 5.
Navy_Codera at 2007-7-12 19:36:16 > top of Java-index,Java Essentials,Java Programming...
# 4
or else try to install netbeans editor. it will come all the packages including inbuild tomcat
jeyrama at 2007-7-12 19:36:16 > top of Java-index,Java Essentials,Java Programming...
# 5
Do not download an IDE if you are learning.
Navy_Codera at 2007-7-12 19:36:16 > top of Java-index,Java Essentials,Java Programming...
# 6
I installed the Java 2 Enterprise Edition 1.4, and still get the same error.what can i do?
deroka at 2007-7-12 19:36:16 > top of Java-index,Java Essentials,Java Programming...
# 7
Try to add servlet.jar to your classpath. You can normally find this file in the lib directory of the Tomcat or other Java compatible server.
kris_javaa at 2007-7-12 19:36:16 > top of Java-index,Java Essentials,Java Programming...
# 8

> Try to add servlet.jar to your classpath. You can

> normally find this file in the lib directory of the

> Tomcat or other Java compatible server.

wrong. servlet.jar is the specific name of a specific file from a specific servlet container.

Other containers have other files with other names in other locations.

jwentinga at 2007-7-12 19:36:16 > top of Java-index,Java Essentials,Java Programming...