Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-1498

basic web resource support for openejb-http

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.0.0-M1
    • None
    • None

    Description

      @EnableServices("http")
      @WebResource("src/test/web")
      @Classes // just to define a module
      public class ResourcesTest {
          @Rule
          public final ApplicationComposerRule container = new ApplicationComposerRule(this);
      
          @RandomPort("http")
          private URL context;
      
          @Test
          public void classloader() throws IOException { // from classloader META-INF/resources/
              assertTrue(IO.slurp(new URL(context.toExternalForm() + "openejb/foo.txt")).contains("from classloader"));
              assertTrue(IO.slurp(new URL(context.toExternalForm() + "openejb/other/foo.txt")).contains("from classloader2"));
          }
      
          @Test
          public void folder() throws IOException { // from src/test/web/*
              assertTrue(IO.slurp(new URL(context.toExternalForm() + "openejb/bar.txt")).contains("from web"));
              assertTrue(IO.slurp(new URL(context.toExternalForm() + "openejb/sub/bar.txt")).contains("from web2"));
          }
      }
      

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            romain.manni-bucau Romain Manni-Bucau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: