This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Package javax.sevlet.http not found in import. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Package javax.sevlet.http not found in import." Watch "Package javax.sevlet.http not found in import." New topic

Package javax.sevlet.http not found in import.

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi all
I have this servlet class in the bottom ,i set the classpath to :
in the classpath under environment tab,then i restart my computer.
what i'm getting is :javax.servlet.http not found in import.
Please help with it and i appreciate your help.
import javax.servlet.*;
import javax.sevlet.http.*;
public class HelloBrowser extends HttpServlet
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws IOException,ServletException
PrinterWriter out = response.getWriter();
String title = request.getHeader("User-Agent ");
if(title == null | | title.equals(""))
title="Unknown Browser ";
title = "Hello,"+ title +"!";
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I think it should be
instead of
Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
From what I see, you have misspelled the package as javax.sevlet.http.*; instead of javax.servlet.http.*;
You might have to correct this as well.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
You are right,thanks alot,but here what i'm getting:
Thanks alot,just i download jsdk2.1 and it compiled well,but
i'm trying to run it using Tomcat 3.1AND I'M geting problems ,here is what i did:
1- I went to server.xml and i changed the port from 8080 to 80
2- I put this the following line in top of startup.bat script,before (@echo off)
"SET JAVA_HOME=d\jdk1.2.2 "
3- I put the HelloBrowser.class in classes directory under
4- I start the server by double click startup.bat from explore
5- I put in the browser:http://localhost:80/servlet/HelloBrowser
I got this error,I did not any result,
i hope you see the problem,i appreciate your help
Have you checked out Aspose?
subject: Package javax.sevlet.http not found in import.
jQuery in Action, 3rd edition