Skip to content

ContextLoader requires servlet-api 2.5 [SPR-7044] #11706

@spring-projects-issues

Description

@spring-projects-issues

David J. M. Karlsen opened SPR-7044 and commented

java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:265)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)

getContextPath() is a servlet-spec 2.5 method http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getContextPath%28%29.
I suggest methods are inspected with reflection to verify presence of appropiate method.


Affects: 3.0.1

Referenced from: commits fa719ad

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions