Mitigate duplicate URL mapping [message #1848549] |
Tue, 07 December 2021 09:42  |
Eclipse User |
|
|
|
I've an error in eclipse stating that a duplicate URL mapping was found for a project.
This is caused by a jar dependency which has mapped a servlet using @WebServlet annotation. The project that imports this jar needs to overwrite the servlet mapping with a custom class but it needs the same url mapping. To achieve this the project configures the servlet mapping in web.xml.
I figure this works because xml configuration takes precedence over the annotations, but would it be possible to mitigate this error without disabling web.xml validation entirely?
Or is this a valid error which could cause issues on certain application servers?
I'm using jboss and wildfly where I've not had any runtime issues.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09390 seconds