Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5679

RichletMapping with "/" on Class does not work on StatelessRichlet class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 10.0.1
    • 10.0.0
    • stateless
    • Security Level: Jimmy
    • None
    • None

      Steps to Reproduce

      1. Create a StatelessRichlet with a RichletMapping("/")
      2. Add a index() method to map with RichletMapping("")
      3. Start a server to visit "/" page (i.e. "http://localhost:8080/myapp/")

      Current Result

      The index() method in a Class extended from StatelessRichlet doesn't be invoked.

      Expected Result

      The index() method should be invoked.

       

      Debug Information

      The Https.sanitizePath() cannot process a single "/" as its value, so it will return a null path that will be returned directly. - https://github.com/zkoss/zk/blob/44af50a04644dff03941bb7568cea55e5dfe3617/zk/src/main/java/org/zkoss/zk/ui/http/RichletFilter.java#L143

      Workaround

      Avoid to use RichletMapping("/") on Class. Instead, using "/foo" or "/anything" to workaround this issue.

            DevChu DevChu
            jumperchen jumperchen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: