Re: Could someone please show a sample webapp on Tomcat 7?

Splash Forums Rewrite Users Could someone please show a sample webapp on Tomcat 7? Re: Could someone please show a sample webapp on Tomcat 7?

#21998

dolphincn
Participant

I have tried all kinds of ways, but there always pop out the same error.

at last, I shutdown laptop, and got out.

when I come back, power on laptop and recreate a new project, add rewrite-servlet.jar and jsf 2.1 lib that included in netbeans 7.1.

and create folder [META-INFservices] under source packaged.

and create RewriteConfiguration extends HttpConfigurationProvider, now it work very well.

I don’t understand what’s wrong before.

public class RewriteConfiguration extends HttpConfigurationProvider {

//@Inject

//private ProductRegistry products;

@Override

public Configuration getConfiguration(final ServletContext context) {

return ConfigurationBuilder.begin().defineRule().when(Direction.isInbound().and(Path.matches(“/admin/”))).perform(Forward.to(“/admin/admin.xhtml”));

}

@Override

public int priority() {

return 0;

}

}