Glassfish 3.1.1 problem?

Splash Forums PrettyFaces Users Glassfish 3.1.1 problem?

This topic contains 6 replies, has 3 voices, and was last updated by  RedShadow 6 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #17933

    RedShadow
    Participant

    I have added the dependecy to my pom.xml for jsf2 and now i face a problem.

    If i add the filter into my web.xml before other filters, prettyfaces filter is called before my own ones, if i remove the entry(i should be able to do this because gf 3.1.1 is a servlet 3.0 container), the filter is called after my filters(should not be the case).

    Anyway it does not work really, can i turn on logging or so to determine which requests were forwarded or so?

    Beside this problem, on which EJB container does pretty faces work without any problems? I do not like this overhead to be able to use the library and i would move to an other container.

    #20960

    RedShadow
    Participant

    I did some testing now and it works, my problem was that i thought an url like “localhost/test/something” would be handled like “localhost/test/something/”

    is this the expected behaviour?

    my pattern ist “/test/something/”

    when i call “/test/something” pretty faces does not forward the request.

    what can i do that both requests “/test/something/” and “/test/something” are handled the same?

    #20961

    Please post your web.xml and pretty-config.xml

    Also please post the version of prettyfaces that you are using, as stated in the posting guidelines, thanks: http://ocpsoft.com/support/topic/posting-rules-and-guidelines

    #20962

    Regarding your second question: Yes, this is expected behavior. There are to options how to solve this:

    1. Just change your pattern and make the trailing slash optional. Remember that these patterns are regular expressions. Something like: /test/something/?

    2. Build an inbound rewriting rule with the trailingSlash attribute. See the documentation for details:

    http://ocpsoft.com/docs/prettyfaces/3.2.0/en-US/html/inbound_rewriting.html#inbound_rewriting.common

    #20963

    Regarding your first question:

    You can enable logging for com.ocpsoft.pretty. We are currently using commons-logging. So the log entries will be forwarded to the logging framework Glassfish is using (JCL?).

    I think PrettyFaces works with most containers without any issues. To be honest, I have the feeling that mostly Glassfish users have problems. I’m using PrettyFaces mainly on JBoss and Tomcat and everything works fine. :)

    #20964

    Regarding the filters: In theory the PrettyFilter should be automatically be added in front of all other filters. It is the first time I’m hearing that it is not working.

    But if it doesn’t work you can still add the filter manually to your web.xml and then place it in front of or after other filters just like you want it to be. You will just have to use the same name for the PrettyFilter as the name that is declared in PrettyFaces’ web-fragment.xml so that the filter is not added twice.

    #20965

    RedShadow
    Participant

    The filter is added correctly within GF 3.1.1 and the problem with the trailing slashes is solved now. Thanks for the answer!

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

You must be logged in to reply to this topic.

Comments are closed.