Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » javax.servlet.* not recognized
javax.servlet.* not recognized [message #173602] Sat, 08 July 2006 18:43 Go to next message
Eclipse UserFriend
Originally posted by: mcraven.2.wright.edu

This is a repost that was originally placed in the webtools.jsf forum and
I am now placing in the webtools forum.

I'm trying to develop a class that extends the HttpServlet Interface.
When I go to import the correct files namely javax.servlet.* and
javax.servlet.http.* I get an error stating the files (or class files I'm
not sure what they are called) are not recognized. How do you go about
creating servlets with an eclipse compiler? I've seen where there is a
download at Sun's site that has those files in it but I don't know where
to unzip the download to.

Brian McRaven
Re: javax.servlet.* not recognized [message #173642 is a reply to message #173602] Sat, 08 July 2006 21:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mcraven.2.wright.edu

I posted this question on Sun's Forum site and this is the response I got
back:

In the Package Explorer view right click on your project folder. Select
the "build path/configure build path" option. Click on the libraries tab.
Click on the "add external jars" button. Navigate to the location where
you installed the Sun J2EE j2ee.jar file (or what ever else jar file has
the servlet package) and select it. Click open. Click okay. Go back and
right click on the project folder and this time refresh the project.

In my case, and this might apply to everyone who tries to do this, I
downloaded a zip file at Sun's website. You place that zip file in
whatever folder you deem appropiate and then do the above except your
looking for a zip file. The add external jars button leads to a form
field that looks for either a jar or a zip file. I haven't managed to
make my servlet work yet but I have a book I'm referencing and I think
everything will work out on that end.

Brian
Re: javax.servlet.* not recognized [message #173706 is a reply to message #173602] Mon, 10 July 2006 01:42 Go to previous messageGo to next message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
On Sat, 08 Jul 2006 14:43:20 -0400, Brian <mcraven.2@wright.edu> wrote:


>
> I'm trying to develop a class that extends the HttpServlet Interface.
> When I go to import the correct files namely javax.servlet.* and
> javax.servlet.http.* I get an error stating the files (or class files
> I'm not sure what they are called) are not recognized. How do you go
> about creating servlets with an eclipse compiler?

Brian, are you using WTP? If you create a dynamic web project, and
define/assign a default server target, those classes are normally found
from your server installation. Hope this helps clarifies the "normal"
workflow,
and maybe you can say if that's what you were doing ... or, if you are
trying
to do all this with "plain" eclipse?
Re: javax.servlet.* not recognized [message #173801 is a reply to message #173706] Mon, 10 July 2006 19:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mcraven.2.wright.edu

I think I'm using plain eclipse. I tried using an add on that was to
allow Java Server Pages compiling and debugging but I couldn't find a
trial version for that so I had to abandon it.

Brian
Re: javax.servlet.* not recognized [message #173857 is a reply to message #173801] Mon, 10 July 2006 20:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <4710c3d112e6f45750b09675a5e1cabe$1@www.eclipse.org>,
mcraven.2@wright.edu says...
> I think I'm using plain eclipse. I tried using an add on that was to
> allow Java Server Pages compiling and debugging but I couldn't find a
> trial version for that so I had to abandon it.
>
> Brian

Check out the WTP (Web Tools Project).

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: javax.servlet.* not recognized [message #175479 is a reply to message #173857] Wed, 26 July 2006 11:53 Go to previous message
Eclipse UserFriend
Originally posted by: ptctt.163.com

You have to install a web container (e.g. Tomcat) first and add the project
into it.
"David Kerber" <ns_dkerber@ns_WarrenRogersAssociates.com> wrote in message
news:MPG.1f1c8666cd6c41e1989694@news.eclipse.org...
> In article <4710c3d112e6f45750b09675a5e1cabe$1@www.eclipse.org>,
> mcraven.2@wright.edu says...
>> I think I'm using plain eclipse. I tried using an add on that was to
>> allow Java Server Pages compiling and debugging but I couldn't find a
>> trial version for that so I had to abandon it.
>>
>> Brian
>
> Check out the WTP (Web Tools Project).
>
> --
> Remove the ns_ from if replying by e-mail (but keep posts in the
> newsgroups if possible).
Previous Topic:Problems launching JSP in Eclipse 3.2
Next Topic:Dependency war
Goto Forum:
  


Current Time: Fri Apr 19 00:06:40 GMT 2024

Powered by FUDForum. Page generated in 0.01810 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top