HttpConfigurationProvider.getConfiguration called several times for one URL

Splash Forums Rewrite Users HttpConfigurationProvider.getConfiguration called several times for one URL

This topic contains 1 reply, has 2 voices, and was last updated by  Lincoln Baxter III 2 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26297

    ravindra
    Participant

    .addRule(Join.path(“/p/usecase”).to(“/p/usecase.xhtml”).withInboundCorrection())
    .addRule().when(Direction.isInbound().and(Path.matches(“/p/usecase/{usecaseFilters}”)))
    .perform(Forward.to(“/p/usecase.xhtml?{usecaseFilters}”))
    .where(“cusecaseFilters”).matches(“.*”).transposedBy(new Transposition<String>() {
    @Override
    public String transpose(Rewrite event, EvaluationContext context, String value) {

    logger.debug(“PrettyConfigurationProvider::usercase URL: {}”,value);

    //here am performing some operation and finally eturn the string

    return transposeURL(event, context, value);
    }
    })

    In console logger printing multiple time

    PrettyConfigurationProvider::usercase URL:
    PrettyConfigurationProvider::usercase URL:
    PrettyConfigurationProvider::usercase URL:
    PrettyConfigurationProvider::usercase URL:
    PrettyConfigurationProvider::usercase URL:
    PrettyConfigurationProvider::usercase URL:
    PrettyConfigurationProvider::usercase URL:
    PrettyConfigurationProvider::usercase URL:
    PrettyConfigurationProvider::usercase URL: …..

    So please help on this .

    #26298

    First, are you sure you want to be using a Forward instead of another join in your second rule?

    .addRule(Join.path(“/p/usecase”).to(“/p/usecase.xhtml”).withInboundCorrection())
    
    .addRule(Join.path(“/p/usecase/{usecaseFilters}”).to(“/p/usecase.xhtml”).withInboundCorrection())
    .where(“usecaseFilters”).matches(“.*”).transposedBy(...)

    Additionally. There are a number of reasons why a transposition would be called multiple times. This is not really a sign that your config provider is being called more than once, it is a sign that multiple requests are being received by the server.

    I hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.