Re: Not seeing .css or images

Splash Forums Rewrite Users Not seeing .css or images Re: Not seeing .css or images

#22177

Tony Herstell
Participant

What I am seeing is .xhtml being added to all the files

>> screen.css.xhtml, (being requested from the server)

I obviously misunderstand what re-write is actually doing.

My rule was just dealing with the .xhtml pages and I hoped the css/images and other files would be allowed through. But; since they didn’t appear on the page I added the rule in the hope they would be let through (even when not logged in).

Taking the lines out for the .css etc.

ConfigurationBuilder config = ConfigurationBuilder.begin();
config.defineRule()
.when(
new HttpCondition() {
@Override
public boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
{
return !identity.isLoggedIn();
}

}.and(Direction.isInbound().andNot(
// Path.matches("/img/{suffix}").where("suffix").matches(".*")
// .or(Path.matches("/resources/css/{suffix}").where("suffix").matches(".*")
// .or(Path.matches("/pages/users/CRUDUser.xhtml")
Path.matches("/pages/users/CRUDUser.xhtml")

.or(Path.matches("/pages/error/generalError.xhtml")
.or(Path.matches("/pages/error/viewExpired.xhtml")
.or(Path.matches("/pages/landing.xhtml")))))))
.perform(Redirect.temporary(context.getContextPath() + "/pages/landing.xhtml"));
return config;

Still finds them rendered as

>> http://localhost:8080/entermyevents/javax.faces.resource/css/screen.css.xhtml

I have to conclude I have no real idea what this filter does…

:/