The best place to ask programming/development questions, imo. UPDATE: stackoverflow is the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but a great reference for finding answers.

My Music (Nickleus)

20130513

war web application wouldn't deploy after upgrading eclipse plugins: java.lang.reflect.InvocationTargetException

i'm using eclipse juno and just upgraded my plugins. when i tried deploying my jee application i suddenly got the following error in the console:
java.lang.reflect.InvocationTargetException
Servlet mapping specifies an unknown servlet name Faces Servlet

to fix this i had to add a servlet declaration in web.xml:
 <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>


this part of web.xml was already there:
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.faces</url-pattern>
 </servlet-mapping>
 <servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>/faces/*</url-pattern>
 </servlet-mapping>

once i added the servlet declaration, then things started working again. the funny thing is that everything worked fine before.

thanks to these pages:
http://www.javaissues.com/2009/08/servlet-mapping-specifies-unknown.html


http://static.springsource.org/spring-webflow/docs/2.0.x/reference/html/ch12s03.html



No comments:

Post a Comment