Re: How to *properly* create and use a CATALINA_BASE installation

2021-11-15 Thread Michael B Allen
On Mon, Nov 15, 2021 at 4:31 PM Christopher Schultz
 wrote:
> > conf
> > All of the conf files.
>
> Specifically, you'll want server.xml and web.xml. You can also choose to
> customize context.xml, and put any [engine]/[host]/[webapp].xml
> deployment descriptors there.

Hi chros,

Ok, so then the minimum required is server.xml and web.xml?

And then there are optional files like context.xml? Are all of the
other files also optional and completely overwrite settings like
tomcat-users.xml or only some?

I have confirmed that adding only web.xml alone resolves the issue
completely. I no longer get 404's and the application works. But I
would like to further understand this as much as possible to document
it for my customers.

Thanks,
Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/

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



Re: How to Upgrade Tomcat

2021-11-15 Thread rakesh meka
Hi All,

Need guidance or help I order to upgrade the current tomcat version on the
server to later version where I have already deployed an application on
windows server and do not want to loss any data.


Current version of tomcat : 8.5.23

Need to upgrade to either : 8.5.73 or 9.0.54



On Tue, 16 Nov, 2021, 3:01 am Christopher Schultz, <
ch...@christopherschultz.net> wrote:

> Jon,
>
> On 11/15/21 15:20, jonmcalexan...@wellsfargo.com.INVALID wrote:
> > Files Required in CATALINA_BASE:
> >
> > bin
> > Only shell scripts or batch files. Make sure that setenv.sh or
> > setenv.bat sets and passes the CATALINA_BASE and CATALINA_HOME
> > locations properly.
> You can't use CATALINA_BASE/bin/setenv.sh to set CATALINA_BASE,
> otherwise this file will never be found ;)
>
> setenv.sh should be used for things like CATALINA_OPTS.
>
> > conf
> > All of the conf files.
>
> Specifically, you'll want server.xml and web.xml. You can also choose to
> customize context.xml, and put any [engine]/[host]/[webapp].xml
> deployment descriptors there.
>
> > lib
> > Only .jar files needed by your Instance, not necessarily the
> > application(s), and definitely not any of the jars from
> > CATALINA_HOME
> This should almost always be empty except maybe for a JDBC driver.
>
> > logs (if in this location)
>
> ... and they should be, unless you have some exotic logging going on.
>
> > webapps (if in this location)
>
> ... and they should be, unless you are using
> CATALINA_BASE/conf/[engine]/[host]/[webapp].xml files.
>
> > temp and work
>
> These must additionally be *writable* by Tomcat.
>
> -chros
>
> >> -Original Message-
> >> From: Michael B Allen 
> >> Sent: Monday, November 15, 2021 2:16 PM
> >> To: users@tomcat.apache.org
> >> Subject: How to *properly* create and use a CATALINA_BASE installation
> >>
> >> Hi,
> >>
> >> What $CATALINA_HOME/conf/ files should be copied into
> >> $CATALINA_BASE?
> >>
> >> RUNNING.txt just says:
> >>
> >> * conf - Server configuration files (including server.xml)
> >>
> >> So it's multiple fileS but not necessarily all if server.xml is
> explicitly included?
> >>
> >> Ideally I would think it should be only files that need to be modified
> since
> >> that seems to be the point of using $CATALINA_BASE. Is this correct?
> >>
> >> I'm trying to use $CATALINA_BASE just because it seems like the proper
> way
> >> to setup Tomcat in general.
> >>
> >> Without $CATALINA_BASE everything works as near as I can tell.
> >>
> >> But if I change $CATALINA_BASE to be different from $CATALINA_HOME in
> >> my startup bat like:
> >>
> >> $CATALINA_HOME/bin/xstart.bat:
> >> SETLOCAL
> >>
> >> set JRE_HOME=%ProgramFiles%\Java\jre1.8.0_311
> >> set CATALINA_HOME=C:\path\to\tomcat
> >> set CATALINA_BASE=C:\path\to\tomcat-base
> >>
> >> "%CATALINA_HOME%\bin\catalina.bat" run %1 %2 %3 %4 %5 %6 %7 %8 %9
> >>
> >> And then in tomcat-base I have:
> >>
> >> bin\tomcat-juli.jar
> >> conf\keystore.jks
> >> conf\server.xml
> >>
> >> The server.xml is stock except for the following:
> >>
> >>   >>  port="8443"
> >>  protocol="org.apache.coyote.http11.Http11NioProtocol"
> >>  scheme="https"
> >>  secure="true"
> >>  SSLEnabled="true">
> >>  
> >>   >>  certificateKeystoreFile="conf/keystore.jks"
> >>  certificateKeystorePassword="as1busiw19"/>
> >>  
> >>  
> >>
> >> conf\tomcat-users.xml
> >> conf\Catalina\localhost\manager.xml
> >> logs\localhost_access_log.2021-11-15.txt
> >> temp\
> >> webapps\myapp\
> >>
> >> Note: There is no myapp\WEB-INF\context.xml
> >>
> >> webapps\manager\
> >>
> >> Tomcat starts up ok and Tomcat Manager works. I can see myapp in the
> >> manager which claims it's deployed and running.
> >>
> >> But trying to access /myapp results in:
> >>
> >>  404 Not Found: The origin server did not find a current
> representation for
> >> the target resource or is not willing to disclose that one exists.
> >>
> >> I can un-deploy /myapp and re-deploy it through the manager and again,
> >> nothing but 404.
> >>
> >> Doesn't work under HTTPS either (and HTTPS works without using
> >> $CATALINA_BASE).
> >>
> >> What could be the problem here?
> >>
> >> I used the following to create a symbolic link to the tomcat directory:
> >>
> >> cmd>mklink /d tomcat apache-tomcat-9.0.54
> >>
> >> Is this ok?
> >>
> >> I'm using Tomcat 9.0.54 32 bit on Windows Server 2016 64 bit. The native
> >> runtime DLL fails to load because it's built for 32bit. But this seems
> to fallback
> >> to the Java runtime just fine. Is this somehow a problem?
> >>
> >> Do I need a deployment context xml?
> >>
> >> I'm a little stumped by this. I don't normally use Tomcat but I just
> wanted to
> >> create an "Application Note" about how to properly use my product with
> >> Tomcat. So I'm really interested in how this all is supposed to work
> and not so
> >> much just seeing it work.
> >>
> >> Thanks,
> >>
> >> Mike
> >> --
> 

Re: How to *properly* create and use a CATALINA_BASE installation

2021-11-15 Thread Christopher Schultz

Jon,

On 11/15/21 15:20, jonmcalexan...@wellsfargo.com.INVALID wrote:

Files Required in CATALINA_BASE:

bin
Only shell scripts or batch files. Make sure that setenv.sh or
setenv.bat sets and passes the CATALINA_BASE and CATALINA_HOME
locations properly.
You can't use CATALINA_BASE/bin/setenv.sh to set CATALINA_BASE, 
otherwise this file will never be found ;)


setenv.sh should be used for things like CATALINA_OPTS.


conf
All of the conf files.


Specifically, you'll want server.xml and web.xml. You can also choose to 
customize context.xml, and put any [engine]/[host]/[webapp].xml 
deployment descriptors there.



lib
Only .jar files needed by your Instance, not necessarily the
application(s), and definitely not any of the jars from
CATALINA_HOME

This should almost always be empty except maybe for a JDBC driver.


logs (if in this location)


... and they should be, unless you have some exotic logging going on.


webapps (if in this location)


... and they should be, unless you are using 
CATALINA_BASE/conf/[engine]/[host]/[webapp].xml files.



temp and work


These must additionally be *writable* by Tomcat.

-chros


-Original Message-
From: Michael B Allen 
Sent: Monday, November 15, 2021 2:16 PM
To: users@tomcat.apache.org
Subject: How to *properly* create and use a CATALINA_BASE installation

Hi,

What $CATALINA_HOME/conf/ files should be copied into
$CATALINA_BASE?

RUNNING.txt just says:

* conf - Server configuration files (including server.xml)

So it's multiple fileS but not necessarily all if server.xml is explicitly 
included?

Ideally I would think it should be only files that need to be modified since
that seems to be the point of using $CATALINA_BASE. Is this correct?

I'm trying to use $CATALINA_BASE just because it seems like the proper way
to setup Tomcat in general.

Without $CATALINA_BASE everything works as near as I can tell.

But if I change $CATALINA_BASE to be different from $CATALINA_HOME in
my startup bat like:

$CATALINA_HOME/bin/xstart.bat:
SETLOCAL

set JRE_HOME=%ProgramFiles%\Java\jre1.8.0_311
set CATALINA_HOME=C:\path\to\tomcat
set CATALINA_BASE=C:\path\to\tomcat-base

"%CATALINA_HOME%\bin\catalina.bat" run %1 %2 %3 %4 %5 %6 %7 %8 %9

And then in tomcat-base I have:

bin\tomcat-juli.jar
conf\keystore.jks
conf\server.xml

The server.xml is stock except for the following:

 
 
 
 
 

conf\tomcat-users.xml
conf\Catalina\localhost\manager.xml
logs\localhost_access_log.2021-11-15.txt
temp\
webapps\myapp\

Note: There is no myapp\WEB-INF\context.xml

webapps\manager\

Tomcat starts up ok and Tomcat Manager works. I can see myapp in the
manager which claims it's deployed and running.

But trying to access /myapp results in:

 404 Not Found: The origin server did not find a current representation for
the target resource or is not willing to disclose that one exists.

I can un-deploy /myapp and re-deploy it through the manager and again,
nothing but 404.

Doesn't work under HTTPS either (and HTTPS works without using
$CATALINA_BASE).

What could be the problem here?

I used the following to create a symbolic link to the tomcat directory:

cmd>mklink /d tomcat apache-tomcat-9.0.54

Is this ok?

I'm using Tomcat 9.0.54 32 bit on Windows Server 2016 64 bit. The native
runtime DLL fails to load because it's built for 32bit. But this seems to 
fallback
to the Java runtime just fine. Is this somehow a problem?

Do I need a deployment context xml?

I'm a little stumped by this. I don't normally use Tomcat but I just wanted to
create an "Application Note" about how to properly use my product with
Tomcat. So I'm really interested in how this all is supposed to work and not so
much just seeing it work.

Thanks,

Mike
--
Michael B Allen
Java Active Directory Integration
https://urldefense.com/v3/__http://www.ioplex.com/__;!!F9svGWnIaVPG
SwU!_6VQfOm0BicBKqHX5YRO8TPWj-
CbBzOJLHUmvYMkxoFKta0WfhOFzKojClKr8XG5MwyZgig$

-
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



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



RE: How to *properly* create and use a CATALINA_BASE installation

2021-11-15 Thread jonmcalexander
Files Required in CATALINA_BASE:

bin
Only shell scripts or batch files. Make sure that setenv.sh or 
setenv.bat sets and passes the CATALINA_BASE and CATALINA_HOME locations 
properly.

conf
All of the conf files.

lib
Only .jar files needed by your Instance, not necessarily the 
application(s), and definitely not any of the jars from CATALINA_HOME

logs (if in this location)

webapps (if in this location)

temp and work

Dream * Excel * Explore * Inspire
Jon McAlexander
Infrastructure Engineer
Asst Vice President

Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions

8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508

jonmcalexan...@wellsfargo.com
This message may contain confidential and/or privileged information. If you are 
not the addressee or authorized to receive this for the addressee, you must not 
use, copy, disclose, or take any action based on this message or any 
information herein. If you have received this message in error, please advise 
the sender immediately by reply e-mail and delete this message. Thank you for 
your cooperation.

> -Original Message-
> From: Michael B Allen 
> Sent: Monday, November 15, 2021 2:16 PM
> To: users@tomcat.apache.org
> Subject: How to *properly* create and use a CATALINA_BASE installation
> 
> Hi,
> 
> What $CATALINA_HOME/conf/ files should be copied into
> $CATALINA_BASE?
> 
> RUNNING.txt just says:
> 
> * conf - Server configuration files (including server.xml)
> 
> So it's multiple fileS but not necessarily all if server.xml is explicitly 
> included?
> 
> Ideally I would think it should be only files that need to be modified since
> that seems to be the point of using $CATALINA_BASE. Is this correct?
> 
> I'm trying to use $CATALINA_BASE just because it seems like the proper way
> to setup Tomcat in general.
> 
> Without $CATALINA_BASE everything works as near as I can tell.
> 
> But if I change $CATALINA_BASE to be different from $CATALINA_HOME in
> my startup bat like:
> 
> $CATALINA_HOME/bin/xstart.bat:
> SETLOCAL
> 
> set JRE_HOME=%ProgramFiles%\Java\jre1.8.0_311
> set CATALINA_HOME=C:\path\to\tomcat
> set CATALINA_BASE=C:\path\to\tomcat-base
> 
> "%CATALINA_HOME%\bin\catalina.bat" run %1 %2 %3 %4 %5 %6 %7 %8 %9
> 
> And then in tomcat-base I have:
> 
> bin\tomcat-juli.jar
> conf\keystore.jks
> conf\server.xml
> 
> The server.xml is stock except for the following:
> 
>  port="8443"
> protocol="org.apache.coyote.http11.Http11NioProtocol"
> scheme="https"
> secure="true"
> SSLEnabled="true">
> 
>  certificateKeystoreFile="conf/keystore.jks"
> certificateKeystorePassword="as1busiw19"/>
> 
> 
> 
> conf\tomcat-users.xml
> conf\Catalina\localhost\manager.xml
> logs\localhost_access_log.2021-11-15.txt
> temp\
> webapps\myapp\
> 
> Note: There is no myapp\WEB-INF\context.xml
> 
> webapps\manager\
> 
> Tomcat starts up ok and Tomcat Manager works. I can see myapp in the
> manager which claims it's deployed and running.
> 
> But trying to access /myapp results in:
> 
> 404 Not Found: The origin server did not find a current representation for
> the target resource or is not willing to disclose that one exists.
> 
> I can un-deploy /myapp and re-deploy it through the manager and again,
> nothing but 404.
> 
> Doesn't work under HTTPS either (and HTTPS works without using
> $CATALINA_BASE).
> 
> What could be the problem here?
> 
> I used the following to create a symbolic link to the tomcat directory:
> 
> cmd>mklink /d tomcat apache-tomcat-9.0.54
> 
> Is this ok?
> 
> I'm using Tomcat 9.0.54 32 bit on Windows Server 2016 64 bit. The native
> runtime DLL fails to load because it's built for 32bit. But this seems to 
> fallback
> to the Java runtime just fine. Is this somehow a problem?
> 
> Do I need a deployment context xml?
> 
> I'm a little stumped by this. I don't normally use Tomcat but I just wanted to
> create an "Application Note" about how to properly use my product with
> Tomcat. So I'm really interested in how this all is supposed to work and not 
> so
> much just seeing it work.
> 
> Thanks,
> 
> Mike
> --
> Michael B Allen
> Java Active Directory Integration
> https://urldefense.com/v3/__http://www.ioplex.com/__;!!F9svGWnIaVPG
> SwU!_6VQfOm0BicBKqHX5YRO8TPWj-
> CbBzOJLHUmvYMkxoFKta0WfhOFzKojClKr8XG5MwyZgig$
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org



How to *properly* create and use a CATALINA_BASE installation

2021-11-15 Thread Michael B Allen
Hi,

What $CATALINA_HOME/conf/ files should be copied into $CATALINA_BASE?

RUNNING.txt just says:

* conf - Server configuration files (including server.xml)

So it's multiple fileS but not necessarily all if server.xml is
explicitly included?

Ideally I would think it should be only files that need to be modified
since that seems to be the point of using $CATALINA_BASE. Is this
correct?

I'm trying to use $CATALINA_BASE just because it seems like the proper
way to setup Tomcat in general.

Without $CATALINA_BASE everything works as near as I can tell.

But if I change $CATALINA_BASE to be different from $CATALINA_HOME in
my startup bat like:

$CATALINA_HOME/bin/xstart.bat:
SETLOCAL

set JRE_HOME=%ProgramFiles%\Java\jre1.8.0_311
set CATALINA_HOME=C:\path\to\tomcat
set CATALINA_BASE=C:\path\to\tomcat-base

"%CATALINA_HOME%\bin\catalina.bat" run %1 %2 %3 %4 %5 %6 %7 %8 %9

And then in tomcat-base I have:

bin\tomcat-juli.jar
conf\keystore.jks
conf\server.xml

The server.xml is stock except for the following:







conf\tomcat-users.xml
conf\Catalina\localhost\manager.xml
logs\localhost_access_log.2021-11-15.txt
temp\
webapps\myapp\

Note: There is no myapp\WEB-INF\context.xml

webapps\manager\

Tomcat starts up ok and Tomcat Manager works. I can see myapp in the
manager which claims it's deployed and running.

But trying to access /myapp results in:

404 Not Found: The origin server did not find a current
representation for the target resource or is not willing to
disclose that one exists.

I can un-deploy /myapp and re-deploy it through the manager and again,
nothing but 404.

Doesn't work under HTTPS either (and HTTPS works without using $CATALINA_BASE).

What could be the problem here?

I used the following to create a symbolic link to the tomcat directory:

cmd>mklink /d tomcat apache-tomcat-9.0.54

Is this ok?

I'm using Tomcat 9.0.54 32 bit on Windows Server 2016 64 bit. The
native runtime DLL fails to load because it's built for 32bit. But
this seems to fallback to the Java runtime just fine. Is this somehow
a problem?

Do I need a deployment context xml?

I'm a little stumped by this. I don't normally use Tomcat but I just
wanted to create an "Application Note" about how to properly use my
product with Tomcat. So I'm really interested in how this all is
supposed to work and not so much just seeing it work.

Thanks,

Mike
-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/

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



[ANN] Apache Tomcat 9.0.55 available

2021-11-15 Thread Rémy Maucherat
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 9.0.55.

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.55 is a bugfix and feature release. The notable
changes compared to 9.0.54 include:

- Experimental OpenSSL support through the Panama API incubating in Java
17, with support for OpenSSL 1.1+.

- Add support for custom caching strategies for web application
resources. This initial implementation allows control over whether or
not a resource is cached.

- Improve robustness of JNDIRealm for exceptions occurring when getting
the connection.

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



[ANN] Apache Tomcat 10.0.13 available

2021-11-15 Thread Mark Thomas

The Apache Tomcat team announces the immediate availability of Apache
Tomcat 10.0.13.

This release is targeted at Jakarta EE 9.

Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 
without changes. Java EE applications designed for Tomcat 9 and earlier 
may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat 
will automatically convert them to Jakarta EE and copy them to the 
webapps directory. This conversion is performed using the Apache Tomcat 
migration tool for Jakarta EE tool which is also available as a separate 
download for off-line use.


Apache Tomcat 10 is an open source software implementation of the
Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language,
Jakarta WebSocket, Jakarta Authentication and Jakarta Annotations
specifications.

The notable changes compared to 10.0.12 include:

- Experimental OpenSSL support through the Panama API incubating in Java
  17, with support for OpenSSL 1.1+

- Add support for custom caching strategies for web application
  resources. This initial implementation allows control over whether or
  not a resource is cached.

- Improve robustness of JNDIRealm for exceptions occurring when getting
  the connection.

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

Downloads:
http://tomcat.apache.org/download-10.cgi

Migration guides from Apache Tomcat 7.0.x, 8.5.x and 9.0.x:
http://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



[ANN] Apache Tomcat 10.1.0-M7 (alpha) available

2021-11-15 Thread Mark Thomas

The Apache Tomcat team announces the immediate availability of Apache
Tomcat 10.1.0-M7 (alpha).

Apache Tomcat 10 is an open source software implementation of the
Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language,
Jakarta WebSocket, Jakarta Authentication and Jakarta Annotations
specifications.

Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 
without changes. Java EE applications designed for Tomcat 9 and earlier 
may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat 
will automatically convert them to Jakarta EE and copy them to the 
webapps directory. This conversion is performed using the Apache Tomcat 
migration tool for Jakarta EE tool which is also available as a separate 
download for off-line use.


Apache Tomcat 10.1.0-M7 is a milestone release of the 10.1.x branch and 
has been made to provide users with early access to the new features in 
Apache Tomcat 10.1.x so that they may provide feedback. The notable 
changes compared to 10.1.0-M6 include:


- Servlet API updates for Servlet 6 including refactoring
  HttpServlet.doHead(), support for generic attributes on Cookies, more
  consistent URI handling including an option to reject 'suspicious'
  URIs

- EL API updates for EL 5.0 including changes to ELResolver.getType()

- Experimental OpenSSL support through the Panama API incubating in Java
  17, with support for OpenSSL 1.1+

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

Downloads:
http://tomcat.apache.org/download-10.cgi

Migration guides from Apache Tomcat 7.0.x, 8.5.x and 9.0.x:
http://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