On Thu, 22 Mar 2001, Mick Sullivan wrote:

> Hi
> Does anyone know why I get the following error when I try to import
> "import javax.servlet.*;  AND
> import javax.servlet.http.*;"
> I need them for my loginHandler to use sendRedirect etc.
> This is the error:
> 
> C:\JBuilder35\jdk1.2.2\bin>javac 
> c:\tomcat\webapps\projectuser\web-inf\classes\l
> oginHandler.java
> c:\tomcat\webapps\projectuser\web-inf\classes\loginHandler.java:7: Package 
> java.
> servlet not found in import.
> import java.servlet.*;
>        ^
> c:\tomcat\webapps\projectuser\web-inf\classes\loginHandler.java:8: Package 
> java.
> servlet.http not found in import.
> import java.servlet.http.*;
> 
> Anyone have any ideas? The answer is probably straight forward (as usual)

Yep :-).  It's javax.servlet.* and javax.servlet.http.*, not java.servlet
and java.servlet.http (note the "x").

When you compile, you will need to make sure that the servlet.jar file
from your servlet container is on the compiler's classpath.

> Thanks in advance,
> Mick
> 

Craig McClanahan

Reply via email to