Re: RFC7807 ErrorReportValve

2020-07-03 Thread Thomas Meyer
Am 2. Juli 2020 21:45:53 MESZ schrieb Mark Thomas :
>On 02/07/2020 20:30, Thomas Meyer wrote:
>> Hi,
>> 
>> What are your opinions on providing a RFC7807 based ErrorReportValve
>as part of Tomcat default distribution?
>
>RFC 7807 looks to be application specific so support for that RFC looks
>to be better handled at the application level.

Mhh, okay, sad to hear.

The basic idea was to provide an ErrorReportValve that always responds with an 
JSON, given the use case that tomcat is sometimes used purely as an HTTP JSON 
based API server, aka. REST, this Valve would always return an JSON object and 
not suddenly an HTML page if for any reason something goes horrible wrong.

It would be a nice to have for tomcat to provide an out of the box support for 
this use case.

But yes the format of the JSON is hard to define generally, above RFC was one 
of the first search results :-)

Mfg
Thomas


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with JarScanFilter, maybe a bug?

2020-07-03 Thread Vitor Medina Cruz
On Thu, Jul 2, 2020 at 11:21 AM Mark Thomas  wrote:

> On 02/07/2020 14:14, Vitor Medina Cruz wrote:
> > On Wed, Jul 1, 2020 at 6:48 PM Mark Thomas  wrote:
>
> 
>
> >> @WebFiler, @WebListener and @WebServlet are deployment annotations so
> >> scanning for these is controlled by the JarScanner.
> >>
> >> If an SCI has an @HandlesTypes annotation then all JARs that are
> >> potential SCI sources will be scanned for matches. To put it another
> >> way, the JarScanner configuration does NOT control the search for
> >> @HandlesTypes matches. Any JAR eligible to provide an SCI will be
> >> scanned for @HandlesTypes. Those JARs are controlled by
> 
> >>
> >
> > Ok, and if a jar doesn't provide a web-fragment name? In this old post(
> >
> http://tomcat.10.x6.nabble.com/Why-does-absolute-ordering-in-web-xml-without-others-kill-classpath-scanning-td5029985.html
> )
> > it is said :
> >
> > "Tomcat will give these a name equal to the name of the JAR file so you
> can
> > use it in ordering. That is a Tomcat specific feature."
> >
> > This is/holds true? I tried with no success
>
> It should do. So for foobar-0.3.jar the name should be "foobar-0.3.jar"
>
>
Don't work... :( both in Tomcat 8.5.56 and 9.0.36 I got a "Used a wrong
fragment name [flow-server-2.2.1.jar] at web.xml absolute-ordering tag"

Maybe it is easy to turn off all scanning and figure out a way to configure
everything explicitly...

regards,
Vitor



> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>