ANN: Bill Stewart's Apache Tomcat Setup for Windows [9.0.71]

2023-01-13 Thread Bill Stewart
Documentation and installer source:

https://github.com/Bill-Stewart/ApacheTomcatSetup

Download installer executable:

https://github.com/Bill-Stewart/ApacheTomcatSetup/releases

(Why an alternative installer for Windows? See the "Background" section in
the documentation for details.)

New in the 9.0.71 installer:

The installer now prompts before overwriting older and different files in
the conf directory when upgrading.


Re: Servlet Deployment Issues

2023-01-13 Thread Christopher Schultz

Anthony,

On 1/13/23 12:03, Anthony Dell'Anno wrote:

Chris,
No, I haven’t seen those replies, but I have changed from JavaFX to Jakarta, as 
StackOverflow suggested that, too.
What I’m experiencing now, is the old version of my HelloWorld class running, 
when I’ve updated it slightly, have recompiled it, and have placed the new 
class file in the webapps directory.
Do you, or does anybody else have sny servlet book suggestions?
Amazon only had this and one other that was even older.


Please go back and read the responses from the other day. Check the 
(threaded) mailing list archives. The subject was "Tomcat 10.1.4 HTTP 
Status 404 and 500 Help". Some of your questions have already been answered.


-chris


On Friday, January 13, 2023, 8:23 AM, Christopher Schultz 
 wrote:

Anthony,

On 1/12/23 18:18, Anthony Dell'Anno wrote:

Good evening everyone,
I am just starting out with Java servlets in Tomcat 10.1.4.
I’m learning them using a book written in 2010, of which I don’t remember the 
authors’ names.


Just FYI, a book written in 2010 will be using the Java EE or old
servlet, etc. package names while Tomcat 10 will want you to use the new
ones. Without going into too much detail, you basically want to change
every instance of:

javax.[stuff]

To:

jakarta.[stuff]


The book does a good job of explaining code samples, but doesn’t
describe any solutions to HTTP errors.

That's appropriate, depending on the error(s) you are seeing. A book
about Java servlets and containers is already going to be pretty long;
adding the details of HTTP would roughly double the size of the book.


I have a HelloWorld servlet, located in my
tomcat_home/webapps/servlet_files/classes/hello_app directory, with
the corresponding web.xml file located just outside of that folder.

The same directory structure is the same for servlet #2. The URL
pattern for HelloWorld is /HelloWorld, and the second servlet’s
web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
HTTPError 404 messages when attempting to run either of them. >
Can anybody help me?


Did you see any of the replies sent back to this list on this topic from
Jan 10th and Jan 11th? I think there are already some ideas in there,
and some questions, too.

-chris

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







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



Re: Servlet Deployment Issues

2023-01-13 Thread Anthony Dell'Anno
Chris,
No, I haven’t seen those replies, but I have changed from JavaFX to Jakarta, as 
StackOverflow suggested that, too.
What I’m experiencing now, is the old version of my HelloWorld class running, 
when I’ve updated it slightly, have recompiled it, and have placed the new 
class file in the webapps directory.
Do you, or does anybody else have sny servlet book suggestions?
Amazon only had this and one other that was even older.


Sent from Yahoo Mail for iPhone


On Friday, January 13, 2023, 8:23 AM, Christopher Schultz 
 wrote:

Anthony,

On 1/12/23 18:18, Anthony Dell'Anno wrote:
> Good evening everyone,
> I am just starting out with Java servlets in Tomcat 10.1.4.
> I’m learning them using a book written in 2010, of which I don’t remember the 
> authors’ names.

Just FYI, a book written in 2010 will be using the Java EE or old 
servlet, etc. package names while Tomcat 10 will want you to use the new 
ones. Without going into too much detail, you basically want to change 
every instance of:

javax.[stuff]

To:

jakarta.[stuff]

> The book does a good job of explaining code samples, but doesn’t
> describe any solutions to HTTP errors.
That's appropriate, depending on the error(s) you are seeing. A book 
about Java servlets and containers is already going to be pretty long; 
adding the details of HTTP would roughly double the size of the book.

> I have a HelloWorld servlet, located in my
> tomcat_home/webapps/servlet_files/classes/hello_app directory, with
> the corresponding web.xml file located just outside of that folder.
> 
> The same directory structure is the same for servlet #2. The URL
> pattern for HelloWorld is /HelloWorld, and the second servlet’s
> web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
> HTTPError 404 messages when attempting to run either of them. >
> Can anybody help me?

Did you see any of the replies sent back to this list on this topic from 
Jan 10th and Jan 11th? I think there are already some ideas in there, 
and some questions, too.

-chris

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






[ANN] Apache Tomcat 9.0.71 available

2023-01-13 Thread Rémy Maucherat
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 9.0.71.

Apache Tomcat 9 is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Unified Expression Language, Java
WebSocket and JASPIC technologies.

Apache Tomcat 9.0.71 is a bugfix and feature release. The notable
changes compared to 9.0.70 include:

- Correct a regression in the refactoring that replaced the use of the
   URL constructors. The regression broke lookups for resources that
   contained one or more characters in their name that required escaping
   when used in a URI path.

- When resetting an HTTP/2 stream because the final response has been
   generated before the request has been fully read, use the HTTP/2 error
   code NO_ERROR so that client does not discard the response. Based on a
   suggestion by Lorenzo Dalla Vecchia.

- Change the default of the org.apache.el.GET_CLASSLOADER_USE_PRIVILEGED
   system property to true unless the EL library is running on Tomcat in
   which case the default remains false as the EL library is already
   called from within a privileged block and skipping the unnecessary
   privileged block improves performance.

Along with lots of other bug fixes and improvements.

Please refer to the change log for the complete list of changes:
https://tomcat.apache.org/tomcat-9.0-doc/changelog.html


Downloads:
https://tomcat.apache.org/download-90.cgi

Migration guides from Apache Tomcat 7.x and 8.x:
https://tomcat.apache.org/migration.html

Enjoy!

- The Apache Tomcat team

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



Re: Servlet Deployment Issues

2023-01-13 Thread Christopher Schultz

Anthony,

On 1/12/23 18:18, Anthony Dell'Anno wrote:

Good evening everyone,
I am just starting out with Java servlets in Tomcat 10.1.4.
I’m learning them using a book written in 2010, of which I don’t remember the 
authors’ names.


Just FYI, a book written in 2010 will be using the Java EE or old 
servlet, etc. package names while Tomcat 10 will want you to use the new 
ones. Without going into too much detail, you basically want to change 
every instance of:


javax.[stuff]

To:

jakarta.[stuff]


The book does a good job of explaining code samples, but doesn’t
describe any solutions to HTTP errors.
That's appropriate, depending on the error(s) you are seeing. A book 
about Java servlets and containers is already going to be pretty long; 
adding the details of HTTP would roughly double the size of the book.



I have a HelloWorld servlet, located in my
tomcat_home/webapps/servlet_files/classes/hello_app directory, with
the corresponding web.xml file located just outside of that folder.

The same directory structure is the same for servlet #2. The URL
pattern for HelloWorld is /HelloWorld, and the second servlet’s
web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
HTTPError 404 messages when attempting to run either of them. >
Can anybody help me?


Did you see any of the replies sent back to this list on this topic from 
Jan 10th and Jan 11th? I think there are already some ideas in there, 
and some questions, too.


-chris

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



Re: Question about Redisson

2023-01-13 Thread Christopher Schultz

Doug,

On 1/12/23 15:51, Doug Whitfield wrote:
Also, Chris's suggesiton to look at 
org.apache.catalina.connector.RECYCLE_FACADES is a good first step.

Note that the value you need for that may not be what you expect.
It needs to be "true" whereas I read the name and think it should
be "false" to disable recycling.


Thanks for coming back to this. This is actually exactly where I
started, but I have not heard back, which is why I didn’t address
it.

BTW, can’t make any promises since not sure how far up things need to
go, but my initial suggestions to marketing about changing that text
on the landing page were met very positively. I’m OOO next week, so
suspect it’ll be a while before you hear anything back, but this
might get fixed next week.


Thank you very much. We do appreciate it, since we really do try to 
provide decent community support here.


-chris

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



Re: Is it possible to add hsts header over http response ?

2023-01-13 Thread Christopher Schultz

Shawn,

On 1/12/23 20:48, Shawn Heisey wrote:

On 1/12/23 01:34, Mark Thomas wrote:

On 12/01/2023 08:26, Hiran CHAUDHURI wrote:
In that case the Connector would need to be configured with 
secure="true" to work correctly/securely and the 
HttpHeaderSecurityFilter would add the HSTS header if configured to do 
so.


My personal opinion is that the header should be added by whatever is 
handling the TLS.


+1

Only the TLS terminator knows whether or not HSTS is appropriate.

I don't have Tomcat in my current setups, but the piece handling TLS for 
me is haproxy.  In a lot of cases it will be Apache httpd.  My haproxy 
frontend config has this:


   http-after-response set-header Strict-Transport-Security 
"max-age=1600; includeSubDomains; preload;"


For Apache httpd, it's:

Header always set Strict-Transport-Security "max-age=15552000; 
includeSubDomains; preload;"


The max-age is up to you, as are the other parameters.

CORS is a whole other matter in httpd. I feel like I spend forever 
getting that to work as hoped.


-chris

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



Re: Tomcat is not Coming Up

2023-01-13 Thread Christopher Schultz

Prabu,

Please don't hijack threads. Start a new thread instead of replying to 
an old message. Your question will get better visibility that way.


Keep reading.

On 1/11/23 10:19, Ganesan, Prabu wrote:

Our Production Server Was Down, We have not Done any changes on this tomcat 
Level

But we are seeing this Message.
Old : INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command 
line argument: -Djava.library.path=/usr/local/apr/lib

New : INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command 
line argument: -Xmx3072m


These command-line options are completely different. I would review all 
lines with "Command line argument" in them together.



Old : INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 
Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.3]

New : INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 
Loaded APR based Apache Tomcat Native library [1.2.17] using APR version [1.4.8]


It appears that without "any changes" your environment has suddenly been 
downgraded from tcnative 1.2.23 to tcnative 1.2.17 and from APR 1.6.3 to 
APR 1.4.8.


What version of Tomcat are you trying to launch? Has that version also 
changed from "Old" to "New"?



Is That could be reason to Not coming up the server?


Maybe. We need more information.

-chris

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