Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7617643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:12:04+00:00 2026-05-31T03:12:04+00:00

I am beginner in Java EE and when I install Tomcat 7, its works

  • 0

I am beginner in Java EE and when I install Tomcat 7, its works fine, I can access http://localhost:8080.

Now I understood that servlet and jsp jars files come under tomcat 7 and no need to download from oracle site.

So my question is when I compile my first servlet, it’s say import javax.servlet.*; and import javax.servlet.http.*; not found.

How can I solved this?

Also one more thing In that servlet, I am also looking for visited user ip address. So I can know the location of that user.

I am using window platform and I configured JDK properly and its work fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:12:05+00:00Added an answer on May 31, 2026 at 3:12 am

    hmmm, this is common question for beginner in Java EE, even I was too. Don’t worry, here I am explaining you – How to solve this problem?. Here I am assume that you know How to install and configure tomcat 7, if not, visit http://www.coreservlets.com/Apache-Tomcat-Tutorial/

    Basically tomcat 7 (even old one) come with servlets and jsp jars, you can find those jar in tomcat’s lib folder

    • Tomcat 7.0\lib
      • servlet-api.jar
      • jsp-api.jar

    Now you need to place these files in classpath (let me know if you don’t know How to set files in classpath) By default tomcat not setting classpath for servlets.

    After that if you compile your java file, it should works. let me know if you face any problem or difficulties.

    if you want user location, you need to use request.getRemoteAddr() and it will give you the ip address, regarding location name (city, state, country and even more information), please visit http://www.maxmind.com/ services.

    Here is the some links

    http://www.maxmind.com/app/geolitecity

    Example – http://geoip.cvs.sourceforge.net/viewvc/geoip/java/CityLookupTestV6.java?view=markup

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a Java beginner and I would appreciate it if someone here can
I'm Java beginner, but I thought that when using try-catch-finally I don't have to
I'm a java beginner, & I'm creating a program that draws lines using the
I am a beginner in java .So please let me know how can i
I am beginner java web developer, now my question is after i developed my
I am a beginner in Java, I have array of bytes that I need
I'm a beginner java programmer. I'm working on an application that decrypts some data.
I'm a Java beginner. I already created a simple GUI application that display will
I'm working on a beginner's java app that converts infix expressions to postfix, then
Possible Duplicate: servlet vs filter I am java beginner. Now I am learning about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.