Re: PrettyFaces – Bypass filtering a pattern

Splash Forums PrettyFaces Users PrettyFaces – Bypass filtering a pattern Re: PrettyFaces – Bypass filtering a pattern

#23056

rbento
Participant

Nope, my pretty-config has 3 simple mappings other than that.

But it happens that it has nothing to do with PrettyFaces. I did a backup then deleted the pretty-config and removed the maven dependency for PrettyFaces. Then deployed the project and the problem persisted.

I noticed that changing the Faces Servlet mapping solves this problem. Of course I can’t change it otherwise it breaks my application. Taking out the application context was really an awful last minute idea.

I’ll refactor it bringing back the context as it solves all the problems. Sorry for bothering you guys, I should have tested it better first.

Also in the near future I’ll start migrating to //rewrite because I liked it so much, it feels pretty solid.

Well, anyway, here is my web.xml and glassfish-web.xml. Nothing weird there other than the damn / context.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="/error.xml">
<context-root>/</context-root>
<class-loader delegate="true"/>
<parameter-encoding default-charset="UTF-8"/>
</glassfish-web-app>

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

<!-- Facelets -->

<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>

<context-param>
<param-name>javax.faces.FACELETS_DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>

<context-param>
<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>

<context-param>
<param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
<param-value>*.xhtml</param-value>
</context-param>

<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>

<!-- PrimeFaces -->

<context-param>
<param-name>com.sun.faces.allowTextChildren</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>none</param-value>
</context-param>

<!-- Servlets -->

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>

<!-- Other settings -->

<session-config>
<session-timeout>
30
</session-timeout>
</session-config>

<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>

<!-- Error handling -->

<error-page>
<location>/error.xhtml</location>
</error-page>

</web-app>

Thanks a lot!

Hugs,

Rod