]
Ian Brandt resolved ARQ-539.
----------------------------
Resolution: Won't Fix
I misunderstood the purpose of the {{(a)ArquillianResource(MyServlet.class)}} version.
I've attempted to [clarify the
Resource injection for Servlet type should inject URL(s) for the
servlet instead of baseURL
-------------------------------------------------------------------------------------------
Key: ARQ-539
URL:
https://issues.jboss.org/browse/ARQ-539
Project: Arquillian
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Affects Versions: 1.0.0.CR2
Reporter: Ian Brandt
Assignee: Ian Brandt
As is suggested by the [current documentation on Resource
Injection|https://docs.jboss.org/author/display/ARQ/Resource+injection] the following
injects the URL for the context (i.e. the base URL, e.g.
"http://localhost:8080/test"):
{code:java}
@Test
private void shouldDoX((a)ArquillianResource(MyServlet.class) URL baseURL)
{
}
{code}
It would seem more intuitive when requesting injection of a URL for the
{{MyServlet.class}} resource if that URL was for MyServlet, e.g.
"http://localhost:8080/test/MyServlet". Since {{MyServlet.class}} could be
deployed to any {{url-pattern}}, e.g. "http://localhost:8080/test/TestServlet",
it's not safe for the end user to guess from the {{baseURL}} and {{MyServlet.class}}
name what the servlet's URL might be. Come to think of it the same servlet could be
deployed to numerous {{url-pattern}}'s, so perhaps injection of a
{{Collection<URL>}} is really what's called for here:
{code:java}
@Test
private void shouldDoX((a)ArquillianResource(MyServlet.class) Collection<URL>
servletURLs)
{
}
{code}
That would imply searching for the servlets in the {{HTTPContext}} by type rather than by
name, however {{org.jboss.arquillian.container.spi.client.protocol.metadata.Servlet}}
currently only stores the name and context root.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: