By the way,

webapp/path1 and webapp/path2 are static resources right?

So they should fall here:
https://github.com/apache/tomee/blob/40105b482301461cf641d25529441333a2fa2778/tomee/tomee-jaxrs/src/main/java/org/apache/tomee/webservices/CXFJAXRSFilter.java#L86-L90
 
<https://github.com/apache/tomee/blob/40105b482301461cf641d25529441333a2fa2778/tomee/tomee-jaxrs/src/main/java/org/apache/tomee/webservices/CXFJAXRSFilter.java#L86-L90>

And maybe delegate.findStaticContent(httpServletRequest, welcomeFiles); might 
be the one making the paths to fall into JASRSInInterceptor.

What type of resources do you have there? 

> On 31 Jan 2019, at 18:50, Roberto Cortez <[email protected]> wrote:
> 
> Maybe we can have something like:
> 
> mp.enabled=all <- Everything enabled
> mp.enabled=none <- Everything disabled
> mp.enabled=config,fault-tolerance <- Only config and fault-tolerance enabled
> 
> And so on…
> 
> Can’t remember exactly how to handle global vs app specific configuration., 
> but I’ll have a look.
> 
> The execution there is helpful, I just don’t get it why path1 and path2 are 
> directed to JASRSInInterceptor. The email that I’ve sent you earlier with a 
> test case seems to work fine for the same case. I wonder what is different 
> that would make it go to JASRSInInterceptor. Let me see if I’m able to figure 
> out something.
> 
> Thanks!
> 
>> On 31 Jan 2019, at 18:35, j4fm <[email protected]> wrote:
>> 
>> Agree, it would be nice if they just worked - but even without issues, I
>> notice a significant start-up time impact even having only around 8 webapps
>> in this case.  Also agree, the enable/disable are only for the active
>> endpoint stuff like health, metrics, openapi.  Already it is useful to have
>> JARs available like mp-config.
>> 
>> I guess it would be a list setting for which ones are enabled by default
>> globally.  Disabled is default.
>> mp.enabled=health,metrics
>> So default globally for Plus/Plume would be mp.enabled=
>> Default globally for MP edition would be mp.enabled=health,metrics,openapi
>> 
>> Same setting for each context which override the global. So in Plus there
>> could be just one webapp with mp.enabled=health,metrics
>> 
>> (If a webapp has mp.enabled= then it overrides the global by disabling.  If
>> the setting is not specified at all it uses global) (Didn't think too much
>> on it or names, but feel it should be enough)
>> 
>> CXFRSFilter:
>> With the servletMappingIsUnderRestPath check, this is what happens when I
>> debug:
>> 
>> Say, I have traditional non-REST webappA:
>> 
>> /webappA/path1 ->DefaultServlet
>> /webappA/path2 ->DefaultServlet
>> 
>> Then MP comes along and it should be this behaviour:
>> 
>> /webappA/ -> REST.InternalApplication
>> /webappA/path1 ->DefaultServlet
>> /webappA/path2 ->DefaultServlet
>> /webappA/Health -> JASRSInInterceptor
>> 
>> But I see this behaviour:
>> 
>> /webappA/ -> REST.InternalApplication
>> /webappA/path1 ->JASRSInInterceptor
>> /webappA/path2 ->JASRSInInterceptor
>> /webappA/Health -> JASRSInInterceptor
>> 
>> As an example, for the request path /webappA/path1/subpath
>> 
>> I find that the servletMappingIsUnderRestPath is run:
>> 
>> wrapper.servletClass=org.apache.catalina.servlets.DefaultServlet
>> 
>> mappingByServlet contains only
>> {StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webappA].StandardWrapper[default]=false}
>> 
>> wrapper =
>> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webAppA].StandardWrapper[default]
>> 
>> So the "accept" value is assigned the value "false".  This means the line82
>> does not trigger chain.doFilter.
>> 
>> So it seems to me that everything underneath webappA is sent to
>> JAXRSInInterceptor and causing 404.
>> 
>> 
>> 
>> --
>> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
> 

Reply via email to