Hi,
On Wed, Apr 6, 2016 at 10:46 AM, Mark Thomas <markt_at_apache.org> wrote:
> I think we need to follow the same rules as for the path of the original
> request. That means we'll need some new request attributes. Something like:
>
> javax.servlet.forward.mapping
> and
> javax.servlet.include.mapping
>
Sounds perfect to me.
>
> If folks think this is sensible, I can add implementing this to my TODO
> list for the next Tomcat milestone so folks can try it out.
>
> If we can iron out the isImplicit() and the more useful
> path/pattern/something return value I can include those updates to.
>
With regards to the isImplicit() method I think it could be something like
this then:
public interface Mapping {
MappingMatch getMappingMatch(); // See Servlet spec 12.2
String getMatch();
String getPatern();
boolean isImplicit(); // see Servlet spec 12.2.1
}
Definition of MappingMatch:
public enum MappingMatch {
PATH, EXTENSION, CONTEXT_ROOT, DEFAULT, EXACT, UNKNOWN
}
Btw, I noticed a typo or small oversight went into the proposed Mapping
interface. There's now a method called getMappingType(), which originally
returned the enum called MappingType. The spec lead changed this before
committing it to MappingMatch, but my guess is he forgot to adjust the
getter as well. That probably should become getMappingMatch(), if that
makes sense?
Kind regards,
Arjan Tijms
>
> Mark
>
>
> >
> > Stuart
> >
> > On Mon, Apr 4, 2016 at 10:19 PM, arjan tijms <arjan.tijms_at_gmail.com>
> wrote:
> >> Hi,
> >>
> >> I wrote a small blog post about the new API here:
> >>
> http://arjan-tijms.omnifaces.org/2016/04/servlet-40s-mapping-api-previewed-in.html
> >>
> >> I think we need to discuss the "implicit" mapping. As by my experiments,
> >> Tomcat never seems to return it, even when calling a *.jsp page. It's
> >> debatable if implicit even is a separate mapping. I mean, can't we have
> an
> >> implicit path mapping, implicit extension mapping etc? Maybe it's
> better to
> >> have an isImplicit() method on the Mapping type?
> >>
> >> I also got some feedback regarding the getPattern() method. People
> (also)
> >> seem to want the pattern in such a way that they can use it right away
> in
> >> their code. E.g. for path mapping the pattern would now be e.g.
> "/path/*",
> >> but it would also be desirable to have a "/path/" returned.
> >>
> >> Another comment concerned the Default mapping. It's now e.g.:
> >>
> >> Default (fallback) mapping
> >> http://localhost:8080/servlet4/doesnotexist
> >>
> >> Mapping match:DEFAULT
> >> Match value:/
> >> Pattern:/
> >>
> >> Should the match value be "/" here, or perhaps better be
> "/doesnotexist"?
> >>
> >> What do you think?
> >>
> >> Kind regards,
> >> Arjan Tijms
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Thu, Mar 31, 2016 at 9:42 AM, arjan tijms <arjan.tijms_at_gmail.com>
> wrote:
> >>>
> >>> Great, thanks!
> >>>
> >>> On Thu, Mar 31, 2016 at 12:58 AM, Greg Wilkins <gregw_at_webtide.com>
> wrote:
> >>>>
> >>>> It is on the todo list.... but probably at least 2 weeks away.
> >>>>
> >>>> cheers
> >>>>
> >>>>
> >>>> On 31 March 2016 at 09:54, arjan tijms <arjan.tijms_at_gmail.com> wrote:
> >>>>>
> >>>>> Greg, Stuart,
> >>>>>
> >>>>> Would it be possible for you to also implement the getMapping API
> that
> >>>>> Mark implemented for Tomcat? That may help ironing out some
> potential issues
> >>>>> as Mark mentioned
> >>>>>
> >>>>> Kind regards,
> >>>>> Arjan Tijms
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Thu, Mar 31, 2016 at 12:18 AM, Greg Wilkins <gregw_at_webtide.com>
> >>>>> wrote:
> >>>>>>
> >>>>>>
> >>>>>> All,
> >>>>>>
> >>>>>> Jetty's stable releases (9.3.x) have had PushBuilder support for a
> few
> >>>>>> months and it is actively being used by our HTTP2 adopters. It was
> this
> >>>>>> usage that found the race condition issues and transient push issues
> >>>>>> discussed elsewhere.
> >>>>>>
> >>>>>> Other that that, no complaints so far. However, this is not
> against a
> >>>>>> servlet 4.0 API but rather our own packaging of the same API.
> >>>>>>
> >>>>>> cheers
> >>>>>>
> >>>>>>
> >>>>>> On 31 March 2016 at 08:38, Stuart Douglas <sdouglas_at_redhat.com>
> wrote:
> >>>>>>>
> >>>>>>> I have initial PushBuilder support implemented in Undertow master,
> >>>>>>> however it is not part of any release yet. It should be possible to
> >>>>>>> use it in Wildfly by simply replacing the existing Undertow and
> >>>>>>> Servlet API jars.
> >>>>>>>
> >>>>>>> Stuart
> >>>>>>>
> >>>>>>> On Wed, Mar 30, 2016 at 10:02 PM, arjan tijms <
> arjan.tijms_at_gmail.com>
> >>>>>>> wrote:
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> On Wed, Mar 30, 2016 at 10:04 AM, Mark Thomas <markt_at_apache.org>
> >>>>>>>> wrote:
> >>>>>>>>>
> >>>>>>>>> Do you mean this one:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> http://search.maven.org/#artifactdetails|org.apache.tomcat|tomcat-servlet-api|9.0.0.M4|jar
> >>>>>>>>>
> >>>>>>>>> All the Tomcat 9.0.0.M4 JARs should be in Maven central along
> with
> >>>>>>>>> a
> >>>>>>>>> full installer as well.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Perfect, thanks!
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> A question is how to proceed with this feature for other Servlet
> >>>>>>>>>> containers, but that's probably best discussed at the Servlet EG
> >>>>>>>>>> list.
> >>>>>>>>>
> >>>>>>>>> The EG members should be watching here...
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> You're right, they should be.
> >>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> I think the first step is for other containers to implement the
> >>>>>>>>> proposal
> >>>>>>>>> so we can iron out any ambiguities in the spec and any
> >>>>>>>>> implementation
> >>>>>>>>> issues we didn't hit in Tomcat.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Sounds like a very good plan indeed. I guess Jetty and Undertow as
> >>>>>>>> active
> >>>>>>>> open source containers would be good initial candidates here?
> >>>>>>>>
> >>>>>>>> Kind regards,
> >>>>>>>> Arjan Tijms
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Mark
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> Kind regards,
> >>>>>>>>>> Arjan Tijms
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> On Tue, Mar 29, 2016 at 8:26 AM, Mark Thomas <markt_at_apache.org
> >>>>>>>>>> <mailto:markt_at_apache.org>> wrote:
> >>>>>>>>>>
> >>>>>>>>>> Any feedback on this?
> >>>>>>>>>>
> >>>>>>>>>> Mark
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> On 17/03/2016 10:39, arjan tijms wrote:
> >>>>>>>>>> > Hi,
> >>>>>>>>>> >
> >>>>>>>>>> > That's really great! I'll do some testing over the weekend
> >>>>>>>>>> and let
> >>>>>>>>>> you know.
> >>>>>>>>>> >
> >>>>>>>>>> > Thanks again
> >>>>>>>>>> >
> >>>>>>>>>> > Kind regards,
> >>>>>>>>>> > Arjan Tijms
> >>>>>>>>>> >
> >>>>>>>>>> >
> >>>>>>>>>> > On Thu, Mar 17, 2016 at 11:11 AM, Mark Thomas
> >>>>>>>>>> <markt_at_apache.org
> >>>>>>>>>> <mailto:markt_at_apache.org>
> >>>>>>>>>> > <mailto:markt_at_apache.org <mailto:markt_at_apache.org>>>
> wrote:
> >>>>>>>>>> >
> >>>>>>>>>> > On 07/03/2016 22:32, arjan tijms wrote:
> >>>>>>>>>> > > Hi,
> >>>>>>>>>> > >
> >>>>>>>>>> > > On Mon, Mar 7, 2016 at 10:03 PM, Mark Thomas
> >>>>>>>>>> <markt_at_apache.org <mailto:markt_at_apache.org>
> >>>>>>>>>> <mailto:markt_at_apache.org
> >>>>>>>>>> <mailto:markt_at_apache.org>>
> >>>>>>>>>> > > <mailto:markt_at_apache.org <mailto:markt_at_apache.org>
> >>>>>>>>>> <mailto:markt_at_apache.org <mailto:markt_at_apache.org>>>>
> wrote:
> >>>>>>>>>> > >
> >>>>>>>>>> > > I can look at implementing this in Tomcat if
> that
> >>>>>>>>>> would
> >>>>>>>>>> be any use.
> >>>>>>>>>> > >
> >>>>>>>>>> > >
> >>>>>>>>>> > > That would be a great step for sure.
> >>>>>>>>>> > >
> >>>>>>>>>> > > For me personally using it for Mojarra is a big use
> >>>>>>>>>> case,
> >>>>>>>>>> and its tests
> >>>>>>>>>> > > run primarily against GlassFish, but I could sure
> >>>>>>>>>> build a
> >>>>>>>>>> personal test
> >>>>>>>>>> > > bed based on Tomcat (in fact, we already have this
> >>>>>>>>>> for
> >>>>>>>>>> OmniFaces ;)).
> >>>>>>>>>> > >
> >>>>>>>>>> > > So if you can look at this that would be great :)
> >>>>>>>>>> >
> >>>>>>>>>> > I've implemented this in 9.0.0.M4 available here:
> >>>>>>>>>> > http://tomcat.apache.org/download-90.cgi
> >>>>>>>>>> >
> >>>>>>>>>> > As always, feedback appreciated.
> >>>>>>>>>> >
> >>>>>>>>>> > Mark
> >>>>>>>>>> >
> >>>>>>>>>> >
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Greg Wilkins <gregw@webtide.com> CTO http://webtide.com
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Greg Wilkins <gregw@webtide.com> CTO http://webtide.com
> >>>
> >>>
> >>
>
>