Re: Ubuntu Tomcat package maintenance

2024-07-18 Thread Joel Griffith
I don't, no.  That's one of the things I'd expect to learn from the listed
Ubuntu package maintainer if I could contact them.

I've given up trying again for the year, and I'm working on a workaround.

Joel

On Fri, Jul 12, 2024 at 4:08 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Joel,
>
> On 7/11/24 16:13, Joel Griffith wrote:
> > A year and a half ago I had to stop updating Tomcat because a Ubuntu
> > packaging bug force-changes file ownership of the Tomcat installation.
> I'm
> > trying to get in touch with the package maintainers to have that fixed.
> >
> > `apt-cache show tomcat` gives ubuntu-devel-disc...@lists.ubuntu.com as
> the
> > maintainers' mailing list.  I tried emailing it, but my posting was
> blocked
> > "pending moderator review" since I'm not a member of that list.  That
> was a
> > year and a half ago, and I've heard nothing.
> >
> > I posted a bug under the Tomcat package on Ubuntu's Launchpad bug
> tracker,
> > but that has sat similarly ignored for the past year and a half.
> >
> > Can anyone on this list help me get in touch with the Ubuntu package
> > maintainers for Tomcat?  Surely there's someone who can get me a degree
> or
> > two closer to them.
>
> Do you know if the package you want is actually from Ubuntu or from
> upstream Debian?
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Issue with JDK 11 and tomcat-embed-core 9.0.91

2024-07-18 Thread Christopher Schultz

Greg,

On 7/15/24 5:01 PM, Greg Eschbacher wrote:

Hi all,

I'm hoping you all can help me:  Our JDK 11 application uses tomcat-embed-core, 
and we're upgrading from 9.0.88 to 9.0.91 and we can no longer compile.

After some investigation, I believe the issue is that the tomcat-embed-core jar 
file no longer contains a module-info.class file.   When I unzip the jar for 
9.0.88 and 9.0.90, those jars contain module-info.class right in the root.  
However, 9.0.91 does not.

The symptom when compiling is this message:  module not found: 
org.apache.tomcat.embed.core   requires org.apache.tomcat.embed.core;

You can see this by comparing:  
https://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.91/tomcat-embed-core-9.0.91.jar
  to 
https://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/9.0.90/tomcat-embed-core-9.0.90.jar

I spot-checked a few more (9.0.84, and 9.0.88) and they all had 
module-info.class in the zip.


Is this change an intentional design change, or perhaps just a mistake?


This looks like a packaging mistake. I see a Bugzilla issue for it and I 
believe it will be fixed for the next releases (likely in early August).


-chris

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



Intermittent Missing Content-Type

2024-07-18 Thread Simon Arame
Greetings folks,

According to JavaServer Pages™ specs v2.3 #JSP4.2, when a JSP page does not
provide the TYPE value of the contentType attribute, "the initial content
type is “text/html” for JSP pages in standard syntax"

With our relatively big web application, we are experiencing an
intermittent issue which is a missing Content-Type header on some JSP pages
and the issue goes away when we use 9.0.90+ or set
org.apache.catalina.connector.RECYCLE_FACADES to true.

Some of our clients are not easily updating their tomcat version so I would
like to know what we are doing wrong maybe in our custom Filter that causes
the occasional missing content-type when facades are not recycled.

I got help from Konstantin Kolinko to locate some historical tomcat code
changes. What I was trying to determine is details about the "recycle"
method of the Request implementation and with Konstantin's help (see
below), I make the reconciliation with the CoyoteRequest and the
CoyoteRequestFacade classes. Now I can see the commit 301781 simply adds
those. Is this coming straight on from a CVS repository ? If yes, can the
CVS repository archive can still be publicly accessed ? At this point, I am
not sure if commit 302827 (
https://svn.apache.org/viewvc?view=revision&revision=302827 ) would explain
what i was searching for. My point is that at 301781 (
https://svn.apache.org/viewvc?view=revision&revision=301781 ), the facade
is only cleared if Constants.SECURITY is true and now since 9.0.90, facades
are cleared by default unless you change the option
org.apache.catalina.connector.RECYCLE_FACADES to false.

So following that logic, I found out what facade recycling was but I don't
know why we rely on it.
The missing content-type occurs when we navigate quickly between jsp pages.

Here are some of the actions we performed in our custom Filter,
1. we are conditionally setting some headers on the Response object.
2. we are conditionally calling the RequestDispatcher.include method to add
a JSP head ( stuffs like  )
3. depending on an external authentication call result we are either
sending a redirect or calling FilterChain.doFilter

Please note that we tried the following without success:
- declaring a default-content-type inside a jsp-property-group as
prescribed by the JavaServer Pages™ Specification v2.3 #JSP.3.3.9

Thank you,
Simon Arame

-- Forwarded message -
From: Konstantin Kolinko 
Date: Thu, Jul 18, 2024 at 2:15 PM
Subject: Re: Earlier Tomcat source code
To: Simon Arame 


чт, 18 июл. 2024 г. в 19:23, Simon Arame :
>
> Hi,
> Thank you for this reply, is it ok if I forward this to the mailing list
with additional questions ?
>

OK.

Best regards,
Konstantin Kolinko

> On Thu, Jul 18, 2024 at 9:43 AM Konstantin Kolinko 
wrote:
>>
>> вт, 16 июл. 2024 г. в 22:44, Simon Arame :
>> >
>> > Hi,
>> >
>> > I recently experienced a problem with tomcat that was fixed by release
9.0.90.
>> >
>> > However, i would like to get a way around the actual proposed fix
which simply changes the default value of property
org.apache.catalina.connector.RECYCLE_FACADES.
>> >
>> > And to understand what's going on, i'm trying to follow the commit
history.
>> > I first stumbled on your message
https://svn.haxx.se/dev/archive-2011-09/0558.shtml that states that tc6 can
not be browsed before 389146/389140
>> > then, i tried to follow the subversion history of the file
org.apache.catalina.connector.Request.java which at revision 302975 changed
from being an interface to being a class. the commit message mentioned it
was copied over from Coyote Adapter, but when I go to coyote subfolder the
Request.java that is there let's say at revision 302974 is the same class
but at an earlier version.
>> >
>> > So i'm trying to fill the gap to understand what happened to that
internal Request class between 302975 and earlier, let's say
https://svn.apache.org/repos/asf/tomcat/connectors/trunk/coyote/src/java/org/apache/coyote/Request.java@301074
...
>> >
>>
>> Regarding looking up the old Tomcat sources
>>
>> 1. If you look at the commit message for r302975,
>> https://svn.apache.org/viewvc?view=revision&revision=302975
>> it mentions "I'm using version number 5.5 for this refactoring, as an
>> indication that this is no longer 5.0.x."
>>
>> Essentially, it looks like a commit that branched off Tomcat 5.5.x,
>> and thus the earlier code is with Tomcat 5.0.x.
>> https://svn.apache.org/viewvc/tomcat/archive/tc5.0.x/trunk/
>>
>>
>> 2. Tomcat consists of several Layers (or Components):
>>
>> Catalina is the container, i.e. Servlet container. It implements the
>> Servlet specification.
>>
>> Coyote is the underlying implementation of network protocols (HTTP,
>> AJP), and all that stuff.
>>
>> There are two "Request" and "Response" classes: one pair in Catalina,
>> and one pair in Coyote.
>>
>> The CoyoteAdapter class is a component of Catalina.
>>
>>
>> 3. In Tomcat 5.0 the relevant code is here:
>>
https://svn.apache.org/viewvc/tomcat/archive/tc5.0.x/trunk