java - Servlet 3 issues with @WebFilter and @WebServlet deployment -
i trying migrate existing servlets , filters defined in web.xml
file @webservlet
, @webfilter
annotations on glassfish v3 server.
currently web.xml
defined 12 servlets , 6 filters . tried removing 1 servlet web.xml
file , added @webservlet
annotation java servlet file .
but having difficulty in accessing servlet when ever jsp trying access servlet glassfish complains "service not available".
basically servlet , filter defined using annotations never identified glassfish server 3.
is existing bug annotations can not used along web.xml
file ? have workaround.
i referred following sun documentation migrate web.xml servlet 3 annotations
you've got web.xml correct, below beginning of web.xml should use:
<?xml version="1.0" encoding="utf-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" metadata-complete="false" version="3.0" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
Comments
Post a Comment