Hi ,
I have created
a wrapper of FacesServlet , accordingly I have
changes to web.xml to point to my WCFacesServlet class . Folowing is my WCFacesServlet .
public class WCFacesServlet extends HttpServlet{
private FacesServlet delegate;
public void init(ServletConfig servletConfig) throws ServletException {
delegate = new FacesServlet();
delegate.init(servletConfig);
}
public void destroy() {
delegate.destroy();
}
public ServletConfig getServletConfig() {
return delegate.getServletConfig();
}
public String getServletInfo() {
return delegate.getServletInfo();
}
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
try {
delegate.service(request, response);
}catch(Throwable e) {
if(e instanceof BusinessException){
((HttpServletResponse)response).sendRedirect(((HttpServletRequest)request).getContextPath() + "businessPageError.jsp");
}else if (e instanceof SystemException){
//goto another error page type
}
}
}
}
The above code ( FacesServlet wrapper ) works fine if application is deployed on TomCat 5.5.. But if I deploy the same application on WebSphere 6.1 is it throwing " ApplicationAssociate ctor not called in same callstack as Configure ".
This is exactly what is it throwing as exception :
"java.lang.IllegalStateException: ApplicationAssociate ctor not called in same callstack as FacesConfigParser.contextInitialized(). The configuration for your Configure Listener or Faces Servlet definitions in your deployment descriptor may be wrong. Please check section 10 of the JSF spec for more details."
Can u plz help me...