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

  • SEARCH
  • Home
  • 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 919803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:36:24+00:00 2026-05-15T18:36:24+00:00

I’m using Eclipse along with plugin m2eclipse to build and manage my project. In

  • 0

I’m using Eclipse along with plugin m2eclipse to build and manage my project. In POM, I have included entry for servlet-api:

  <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
    <scope>provided</scope>
  </dependency>

Scope is provided, not to include the .jar file to .war package, (it is already provided by the tomcat servlet container). Compilation by mvn install is correct, file is not included into WEB-INF\lib, deployment to tomcat is working, program is working, it’s ok.

But, the case starts inside Eclipse. After starting my web application from eclipse, i’m getting error:

\WEB-INF\lib\servlet-api-2.5.jar) –
jar not loaded. See Servlet Spec 2.3,
section 9.7.2. Offending class:
javax/servlet/Servlet.class

I don’t know why, because, Maven Dependencies(including javac-servlet-2.5.jar) are included as Java EE Module Dependencies, and should be putted inside WEB-INF\lib folder, while starting from eclipse. On the other hand, in eclipse I’ve provided path to my apache tomcat directory, and inside project, there are automatic references to libraries from Apache Tomcat v6.0 including servlet-api.jar.

So basically, after removeing reference from the POM to servlet-api-2.5.jar, that library dissapears from Maven Dependencies, and I get no exception while starting my web app from eclipse. Everything is fine… in eclipse.

Of course without entry inside POM, this time mvn install failes with the same exception, I have provided earlier.

Is there any way to make it working without removing and than inserting reference, depending of what I want to do: compile with maven or run with Eclipse ?

Regards

  • 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-15T18:36:25+00:00Added an answer on May 15, 2026 at 6:36 pm

    This

    \WEB-INF\lib\servlet-api-2.5.jar) – jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

    is simply a warning from the app server that it is ignoring one of your included JARs and will not load it. It can be safely ignored.

    Sounds like the issue is with the portion/plugin for Eclipse that loads your project in an embedded app server – sounds like it simply uses the list of dependencies as what to bundle as the library path, and has no concept of Maven scopes.

    Personally I would ignore something like this – your Maven build is working fine, running the app within Eclipse should work fine besides this ignorable warning – otherwise you’ll have to go down the path of tweaking your project for what one tool expects (the web app plugin for Eclipse) versus another (Maven).

    (Also I’ve always found that running webapps as “Web projects” within Eclipse is a pain in the butt, and leads to all sorts of oddities – not worth the hassle – if you want to quickly load your Maven webapp project in a servlet container, simply use mvn jetty:run or mvn tomcat:run. Fighting with IDEs can be a waste of time).

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't

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.