• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem setting up Servlet / JSP jars in pom.xml for Tomcat 7

 
Jack Rooney
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am using JDK 1.6, Maven 2.2.1, Tomcat 7 and Eclipse Juno (Enterprise Edition).

When trying to import packages such as javax.servlet.*; Eclipse complained
that it does not have it inside its classpath (build path).

So, what I did was include the following dependencies in my pom.xml file:



During tomcat server startup:



Why is it logging this message?

Also, I can't seem to find the right versions for servlet-api 3.0 or jsp 2.2 in the maven repository

http://mvnrepository.com/

Kindly help me...
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More of a Maven question than a Tomcat question.

You need the following:


Note the scope: "provided". That says that these 2 dependencies are provided at runtime by Tomcat and that Maven must NOT include copies of them in the resulting WAR file. Maven will use reference copies of them for compiling.

Also note that you must not attempt to build a WAR using versions of these dependencies that are not compliant with the versions actually in place in the target server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic