Skip to content

Commit

Permalink
configuration pour jersery
Browse files Browse the repository at this point in the history
  • Loading branch information
patou committed Dec 5, 2024
1 parent 45d4d94 commit fbcbb98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
3 changes: 1 addition & 2 deletions liste-envies-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version> <!-- ou une version plus récente -->
<scope>provided</scope>
<version>5.0.0</version>
</dependency>

<!-- ================ Big Query ==================================== -->
Expand Down
23 changes: 9 additions & 14 deletions liste-envies-war/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,23 @@
<url-pattern>/*</url-pattern>
</filter-mapping>

<servlet>
<servlet>
<servlet-name>jersey-servlet</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>fr.desaintsteban.liste.envies.rest,fr.desaintsteban.liste.envies.exception</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-name>jersey.config.server.provider.scanners</param-name>
<param-value>jakarta.ws.rs.ext.Provider</param-value>
</init-param>
<init-param>
<param-name>jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
<param-name>jersey.spi.container.ContainerResponseFilters</param-name>
<param-value>fr.desaintsteban.liste.envies.ResponseCorsFilter</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
Expand All @@ -66,15 +70,6 @@
<url-pattern>/api/*</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>MigrateServlet</servlet-name>
<servlet-class>fr.desaintsteban.liste.envies.servlet.MigrateServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MigrateServlet</servlet-name>
<url-pattern>/admin/migrate</url-pattern>
</servlet-mapping>

<security-constraint>
<web-resource-collection>
<web-resource-name>Admin</web-resource-name>
Expand Down

0 comments on commit fbcbb98

Please sign in to comment.