jersey
  1. jersey
  2. JERSEY-1774

Adding static resources doesnt work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0-rc1, 2.0
    • Component/s: extensions
    • Labels:
      None
    • Environment:

      Ubuntu, Embedded grizzly

      Description

      the following code is unable serve static resources in the webapp folder.

      val server = GrizzlyHttpServerFactory.createHttpServer(uri, new ResourceConfig())
      val statichandler = new StaticHttpHandler()
      statichandler.addDocRoot("/webapp")
      statichandler.start
      server.getServerConfiguration.addHttpHandler(statichandler)
      server.start
      

        Activity

        Show
        Marek Potociar added a comment - You most likely need to add a separate handler for each. See here: https://github.com/jersey/jersey/blob/master/examples/sse-twitter-aggregator/src/main/java/org/glassfish/jersey/examples/aggregator/App.java
        Hide
        Marek Potociar added a comment -

        Closing as invalid

        Show
        Marek Potociar added a comment - Closing as invalid

          People

          • Assignee:
            Marek Potociar
            Reporter:
            kul
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: