You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2015/01/22 08:37:34 UTC

[jira] [Resolved] (TOMEE-1498) basic web resource support for openejb-http

     [ https://issues.apache.org/jira/browse/TOMEE-1498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Manni-Bucau resolved TOMEE-1498.
---------------------------------------
    Resolution: Fixed

> basic web resource support for openejb-http
> -------------------------------------------
>
>                 Key: TOMEE-1498
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1498
>             Project: TomEE
>          Issue Type: New Feature
>            Reporter: Romain Manni-Bucau
>            Assignee: Romain Manni-Bucau
>             Fix For: 2.0.0-Milestone-1
>
>
> {code}
> @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"));
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)