Web.xml ServiceLifeCycle error

Hi,

We're using the ServiceLifecycle class inside a web.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

...
<servlet>
 <servlet-name>MyService</servlet-name>
 <servlet-class>MyServiceClass</servlet-class>
 </servlet>


...
</web-app>

public class MyServiceClass  implements javax.xml.rpc.server.ServiceLifecycle {...}

For some reason intellij will see this as an error as it isn't a direct implementation of the Servlet class. But this is a valid configuration and can be deployed under JBoss/WebSphere.

How can I prevent this error from popping up?

I really like the validation/inspection of IntelliJ IDEA so I don't want to disable the web.xml validation.

Kind Regards,
Alasiac
3 comments
Comment actions Permalink

Choose "Suppress for tag" from inspection's options.

0
Comment actions Permalink

I know I can ignore errors by using the suppress mechanism, but this also adds an additional xml tag which is IDE specific. I would expect inspection to take jax-rpc into account and handle it appropriately. Or am I missing something and is my code incorrect (although working)? Is this perhaps an 'unofficial' way of coding?

Kind Regards,
Alasiac

0
Comment actions Permalink

AFAIK your configuration is correct. Feel free to file an issue to our
bugtracker for this problem.

0

Please sign in to leave a comment.