diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/web.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/web.mustache
index ae6f6d4d69..2046f433bb 100644
--- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/web.mustache
+++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/web.mustache
@@ -41,7 +41,7 @@
jersey
- /*
+ {{contextPath}}/*
ApiOriginFilter