Re: PrettyFaces and Dynamic Sitemap Generation

Splash Forums PrettyFaces Users PrettyFaces and Dynamic Sitemap Generation Re: PrettyFaces and Dynamic Sitemap Generation

#21778

How is this EJB packaged? Is it inside the WAR or in a separate JAR inside an EAR? However I’m note sure this will work correctly as PrettyContext.getCurrentInstance() is using FacesContext.getCurrentInstance() internally which may not work from EJBs.

But there are other ways of obtaining the PrettyConfig instance. For example:

PrettyConfig prettyConfig = (PrettyConfig) servletContext.getAttribute(PrettyContext.CONFIG_KEY);

However, you will need to have access to the ServletContext in this case. Please be aware that PrettyFaces always initializes itself for one web application, so you will definitively have to use something like the ServletContext to access the PrettyFaces configuration.