[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to import javax.servlet.*;

Posted on 2004-11-06
8
Medium Priority
?
4,093 Views
Last Modified: 2008-02-01
Can someone tell me where i find the javax.servlet package. I am using Eclipse and when I include the import statement import javax.servlet.*; it says it cannot be resolved. searching in the package javax I find a lot of packages like security, sound, swing, xml,  but not javax.servlet. These  packages seem to be in the jar files in the jdk/jre/lib folder.

thanks,
Bruce Mutch
0
Comment
Question by:bmutch
8 Comments
 
LVL 28

Assisted Solution

by:rrz
rrz earned 140 total points
ID: 12515337
servlet-api.jar   If you are using Tomcat then it is in  Tomcat/common/lib
0
 
LVL 28

Expert Comment

by:rrz
ID: 12515401
You can download Tomcat from
http://jakarta.apache.org/site/binindex.cgi   
for the Servlet 2.4 API  get
5.0.28.zip  or   5.0.28.tar.qz
0
 

Author Comment

by:bmutch
ID: 12516180
thanks I've got Tomcot, just need to know how to include the jar file in my project in Eclipse now that I know what the path is.

Bruce Mutch
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

Expert Comment

by:rrz
ID: 12517301
>how to include the jar file in my project in Eclipse
Sorry, I don't use Eclipse.  Maybe someone will help.
0
 
LVL 11

Accepted Solution

by:
raj3060 earned 160 total points
ID: 12518066
Did you say eclipse, (websphere) then you should have the javax library there you don't need to import it. It comes with rt.jar file.
If you want to include the file then follow these directions:
1. right click on your project folder inside the project navigation window (make sure you are running websphere and in the project)
2. click on the properties
3. It will open a new window Properties for 'yourProject'
4. Select Java Build Path
5. Click on Libraries
6. Click on Add External JARs
7. now select the jar file from the menu you want to select, and that's it.
0
 
LVL 6

Expert Comment

by:CodingExperts
ID: 12520735
1) download servlet.jar
2) go to file -> new->project
3) click on java project in the widow that opens up and do next
4) specify the project name and do next
5) go to the libraries and select "ADD EXTERNAL JAR" and specify the location of servlet.jar and do finish
6) NOw run your code.


CE
0
 
LVL 2

Expert Comment

by:siliconeagle
ID: 12522110
if you have already created you project :-
1. rt clk on the project in the navigator and select properties.
2. selelect "Java Build path" from the left hand box
3. select libraries tab
4. select "ADD EXTERNAL JAR" and specify the location of servlet.jar.
5. click "Finish" button.
you will then see the code being rebuilt.
0
 

Author Comment

by:bmutch
ID: 12525286
thanks all , I awarded based on the first one to give new info.

Bruce Mutch
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I came across an unsolved Outlook issue and here is my solution.
Most folks would know the basics of how Dropbox works, so that’s not the purpose of this article. Security is what it’s all about, so here I’ll share how I choose to secure my Dropbox Account and the Data it contains.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question