Click here to Skip to main content
15,886,873 members
Articles / Programming Languages / Java
Tip/Trick

Solution: The import javax.servlet.ServletRegistration cannot be resolved

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
27 Feb 2013CPOL 19.5K   1  
Resoled using a simple Maven dependency.

Introduction 

This tip gives explains how to fix this error: import javax.servlet.ServletRegistration.Dynamic cannot be found.

Background

I downloaded spring-mvc-chat from https://github.com/rstoyanchev/spring-mvc-chat but when trying to import some code parts, got an irritating import error:  

import javax.servlet.ServletRegistration.Dynamic cannot be found 

Using the code 

The problem was a missing Maven dependency:

XML
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect ENGetica
Israel Israel
A Computers Engineer with accumulate 10 years of experience in varying software and business fields. Natural Entrepreneur. Technology and business enthusiast.

Comments and Discussions

 
-- There are no messages in this forum --