I have following entry in my web.xml and I need instance of that class in my java file
how do I do that?
<servlet>
<servlet-name>DummyServlet</servlet-name>
<servlet-class>javax.faces.webapp.Xxxx</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
You normally do not, the servlet container is responsible for instantiating a single Servlet instance for every servlet element in the web.xml and to use these to process requests and generate responses.
Otherwise, you probably need to parse the web.xml and get the servlet class using Class.forName(className) and then create an instance using clazz.newInstance() assming a default constructor exists (which it should, since this is a servlet).