Also I am using Jakarta EE version of Java, I have put up rs2xml.jar and jakarta-servlet-api-4.0.3.jar file to remove the 404 servlet error. I have the web.xml file where I have implemented the following code to remove 404 error
<error-page><error-code>404</error-code><location>/App Exception Handler</location></error-page>