Re: OT: Tomcat on AWS for Dummies

2019-07-19 Thread Mark Eggers
> Jerry,
> 
> On 7/19/19 13:38, Jerry Malcolm wrote:
 I have had a dedicated hosted environment with WAMP and Tomcat for
 over 15 years.  I'm very familiar with everything related to that
 environment... apache http, mysql, dns server, the file system,
 JAMES, and all of my management scripts that I've accumulated over
 the years. Everything is in the same box and basically on the same
 desktop. But now I have a client that has needs that are best met
 in an AWS environment.
> Can you explain that in a little more depth? What is it about AWS that
> meets their needs better?
> 
> I ask because you can provision a one-box wonder in AWS just like you
> do on a physical space with a single server. You just have to use
> remote-desktop to get into it, and then it's all the same.
> 
> But if they want to use RDS, auto-scaling, and other Amazon-provided
> services then things can get confusing.
>> Unfortunately, that is the precise reason we need to go AWS
>> Extremely high availability and scalability / load-balancing across
>> multiple instances.  There will need to at least one instance running at
>> all times. Even when doing maintenance/upgrades on other instances.
> 
> So the answer to your question really depends upon what the client
> thinks they'll be getting by you taking your existing product "to the
> cloud".
> 
 I understand just enough AWS to be dangerous, which is not
 much I do know that it's a bunch of different modules, and I
 believe I lose the direct file system access.
> That heavily depends upon how you do things. You can get yourself a
> server with a disk and everything, just like you are used to doing.
>> Do you mean AWS offers a 'file server' module that I can basically
>> access directly as a drive from TC?  If so, that eases my mind a bunch. 
>> I manage and serve gigabytes of videos and photos.  I don't really want
>> a full CMS implementation.  Just want a big hard drive I can get to.
> 
 I've watched an AWS intro video and a couple of youtube videos on
 setting up TC in AWS. But they always starts with "now that you
 have your AWS environment set up".   I am looking for something
 that explains the big picture of migrating an existing WAMP+TC to
 AWS.  I am not so naive to think that there won't be significant
 rip-up to what I have now. But I don't want to do unnecessary
 rip-up just because I don't understand where I'm heading.
 Basically, I don't know enough to know what I don't know But I
 need to start planning ahead and learning soon if I'm going to have
 any disasters in my code where I might have played it too loose
 with accessing the file system directly in my dedicated
 environment.

 Has anyone been down this path before and could point me to some
 tutorials targeted to migrating WAMP+TC to AWS? Or possible
 hand-hold me just a little...? I'm a pretty quick learner.  I just
 don't know where to start.
> As usual, start with your requirements :)
> 
>> Requirements are what I have now in a single box, but with the addition
>> of multiple instances of TC (and HTTPD and/or mySQL?) for HA and load
>> balancing.  Day-1 launch won't be massive traffic and theoretically
>> could be handled by my single dedicated server I have today.  But if
>> this takes off like the client predicts, I don't want to get caught
>> flat-footed and have to throw together an emergency redesign to begin
>> clustering TC to handle the traffic. Rather go live initially with
>> single instance AWS, but with a thought-out (and tested/verified) plan
>> to easily begin clustering when the need hits.
> 
>> Thanks again for the info.
> 
> 
> -chris

There are a lot of ways to approach this. I'm not sure how much is
viable under Windows, since I've only done Linux EC2 instances.

Load balancing:

You can't do multicasting (last I checked) in a cloud environment.
You'll need to use something like redis or memcache if you need to
support sessions / load balancing without sticky sessions. I recommend
steering away from sticky sessions because that complicates outages /
maintenance.

Database:

I'd look at RDS and multiple instances across availability zones. There
are some issues with fail-over and the time it takes. Look at recent AWS
forums for work-arounds.

Disks:

I think that one good design (if you can't do Docker or Elastic
Beanstalk) is to place all of your tools on an EBS volume. You can mount
this on Windows (I think - works with Linux), and access all of your
services from there.

There are several advantages to this. Backups are done by doing
snapshots of unmounted disks. You basically do the following:

1. Disconnect an instance from a load balancer
2. Unmount the driver from the instance
3. Perform the snapshot command
4. Once the snapshot command returns, remount the drive
5. Add the instance back to the load balancer

Server instances:

In a cloud environment, server 

Re: OT: Tomcat on AWS for Dummies

2019-07-19 Thread Jerry Malcolm

Christopher,

On 7/19/2019 1:40 PM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jerry,

On 7/19/19 13:38, Jerry Malcolm wrote:

I have had a dedicated hosted environment with WAMP and Tomcat for
over 15 years.  I'm very familiar with everything related to that
environment... apache http, mysql, dns server, the file system,
JAMES, and all of my management scripts that I've accumulated over
the years. Everything is in the same box and basically on the same
desktop. But now I have a client that has needs that are best met
in an AWS environment.

Can you explain that in a little more depth? What is it about AWS that
meets their needs better?

I ask because you can provision a one-box wonder in AWS just like you
do on a physical space with a single server. You just have to use
remote-desktop to get into it, and then it's all the same.

But if they want to use RDS, auto-scaling, and other Amazon-provided
services then things can get confusing.
Unfortunately, that is the precise reason we need to go AWS 
Extremely high availability and scalability / load-balancing across 
multiple instances.  There will need to at least one instance running at 
all times. Even when doing maintenance/upgrades on other instances.


So the answer to your question really depends upon what the client
thinks they'll be getting by you taking your existing product "to the
cloud".


I understand just enough AWS to be dangerous, which is not
much I do know that it's a bunch of different modules, and I
believe I lose the direct file system access.

That heavily depends upon how you do things. You can get yourself a
server with a disk and everything, just like you are used to doing.
Do you mean AWS offers a 'file server' module that I can basically 
access directly as a drive from TC?  If so, that eases my mind a bunch.  
I manage and serve gigabytes of videos and photos.  I don't really want 
a full CMS implementation.  Just want a big hard drive I can get to.



I've watched an AWS intro video and a couple of youtube videos on
setting up TC in AWS. But they always starts with "now that you
have your AWS environment set up".   I am looking for something
that explains the big picture of migrating an existing WAMP+TC to
AWS.  I am not so naive to think that there won't be significant
rip-up to what I have now. But I don't want to do unnecessary
rip-up just because I don't understand where I'm heading.
Basically, I don't know enough to know what I don't know But I
need to start planning ahead and learning soon if I'm going to have
any disasters in my code where I might have played it too loose
with accessing the file system directly in my dedicated
environment.

Has anyone been down this path before and could point me to some
tutorials targeted to migrating WAMP+TC to AWS? Or possible
hand-hold me just a little...? I'm a pretty quick learner.  I just
don't know where to start.

As usual, start with your requirements :)


Requirements are what I have now in a single box, but with the addition 
of multiple instances of TC (and HTTPD and/or mySQL?) for HA and load 
balancing.  Day-1 launch won't be massive traffic and theoretically 
could be handled by my single dedicated server I have today.  But if 
this takes off like the client predicts, I don't want to get caught 
flat-footed and have to throw together an emergency redesign to begin 
clustering TC to handle the traffic. Rather go live initially with 
single instance AWS, but with a thought-out (and tested/verified) plan 
to easily begin clustering when the need hits.


Thanks again for the info.



- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0yDpIACgkQHPApP6U8
pFj5GA/+Pr+CXtOGTYsZqCWVT7KYqvAulyyyZsHOvS2oaiapjrsWORYA5rzS478y
TE+rMAUc7ep0RToW1ZCAhtyKi+M1vfIwGu6qkFA6NCBWKL92I8jaFw+j/pDJ0mSJ
sfv0OGu8hAmQwy2FCpscgFR9PBKNzJN3o5OhR0cp1g0i6/J5Ci9xkn92KVAv1ZIU
WjY+WrE9tcqtASHjO/wS53YreHlXoPLSzhpbjwje/HzKkBYXRV9dRIpHLnOSNc6t
+5LhnLghVR27J3n/w1xFeO8kM3SBySuCHhUGTNCKdxMlrprxCIwZjvgLwHBxwv17
tK6NOxmuk4xsi7vrKGhR/PWYHuTMNrYkWwD3Hv2vskwqo4RioIOaseoXBGHYy/WN
iDwN6viSzSCqivP+MLBGi00Xo3LFdJZu+DMufX05SYJvRxxO6yaNMxING7zr9ubJ
ossrDNIkHSDs4J0SAvzYidfPCOUbRWvHI6dYLkqsieRk7pWp2JPSWBWKuisllBnP
VOv4IaVfZNHGE5TmkWElKE8Cbyj8xxSerFN15RjoawmwnnP9c1L8LirTi/l7GEQN
HlQfNFP+evIbGpPOrcUpZJa5sjfePeUl+jJj08DPw0djyG3K3tAcBQTO4LjqsKTC
g1phEO502BxE8v1UPTpEYXGfxhvMSirvjC37lXbTabNo3R4Tbt4=
=SUFA
-END PGP SIGNATURE-

-
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



HTTP to HTTPS redirect not happening

2019-07-19 Thread Richard Huntrods
I tried implementing automatic redirection from HTTP to HTTPS on my
tomcat today, but it's not working.

First, my system:
OS: Ubuntu 18.04.2 LTS (server)
Tomcat: 9.0.22 (installed from tomcat distribution, not via apt get)
Java: OpenJDK "11.0.3" 2019-04-16
Mysql: Ver 14.14 Distrib 5.7.26

This web application has it's own domain (let's call it "mydomain.com" )
and has working HTTPS - and has done  for some time now.

Static web pages are served on this application via tomcat using the
ROOT directory ../tomcat/webapps/ROOT

Again, this is working just fine. If I type "https://mydomain.com; I see
the secure static pages. If I type "http://mydomain.com; I see the same
pages, but browsers inform me the page isn't secure.

I want to force tomcat to redirect "http://mydomain.com; to
"https://mydomain.com; always.

I found instructions for auto-redirection on several on-line sites, and
all had the same instructions.

I already have the redirect code in server.xml:

   

So all I had to add (according to the instructions) was code at the end
of ...tomcat/conf/web.xml

 
 
 Secured
 /*
 
 
 CONFIDENTIAL
 
 

just before the final 

I did this and restarted tomcat. It doesn't work.

After restarting tomcat, if I type in "http://mydomain.com; I still see
the unsecured version. It does not auto-redirect to https.

What am I missing?

Thanks,
-Richard

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

--
This communication is intended for the use of the recipient to whom it is 
addressed, and may contain confidential, personal, and or privileged 
information. Please contact us immediately if you are not the intended 
recipient of this communication, and do not copy, distribute, or take action 
relying on it. Any communications received in error, or subsequent reply, 
should be deleted or destroyed.
---

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



Re: tomcat 7.0.90 ubuntu web-security.xml doesn't work.

2019-07-19 Thread richard coleman
Chris,

Thanks for responding.  I got that from the web.xml file itself;

> 


The only references I can find (including the archives of this list) are
copies of web.xml with those same instructions.  Creating a block that
adheres to that DTD and placing it in the bottom of web.xml (before the
last  tag) works as expected.

The web.xml file is dynamically generated and so I am left with having to
remember to update the tomcat7/webapps//WEB-INF/web.xml by hand *after* it
is finished deploying from the .war file.  If I could place it in a
separate static web-security.xml file than it can be packaged in the .war
file and automatically applied whenever the application is deployed.

Thanks again for your help,

rik.

On Fri, Jul 19, 2019 at 2:44 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Richard,
>
> On 7/19/19 11:33, richard coleman wrote:
> > Hi all,
> >
> > Running tomcat 7.0.90, I am trying to add a security block to a
> > struts 1 application to redirect *most* urls to https.  It works
> > fine when I add it to the web.xml file in the
> > webapps//WEB-INF/web.xml file.
> >
> > That file states that I should be able to add it to a separate
> > web-security.xml file, but when I do so, tomcat *ignores* the
> > web-security.xml file.
> >
> > Is there something that's *not* mentioned that I am forgetting to
> > do to actually get this to work?
>
> I think you are asking the wrong mailing list. If you are using Struts
> for the redirection, then you want to ask the Struts folks why it's
> not working. You might want to provide en example of your
> configuration when doing so if you post over there.
>
> You might get crickets in response since you are asking about a
> product that was abandoned years ago. I feel your pain; I still use
> Struts 1.x myself. :(
>
> I've never heard of web-security.xml. Ever.
>
> What is it you are trying to configure in web-security.xml that works
> when you put it into web.xml? Why not just put it into web.xml if
> that's where it works?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0yD6MACgkQHPApP6U8
> pFjuIg/+ND6tguQw6z579Tabcc3movui80Zdva4EEyMzzCaJl0kkvF8wqVdEzErG
> uCOni0gwo3VflY5cdOM8cdAjcoR2iue3LrWOKQKEtuKpTuv6bGPO/HjGUBtKzMnd
> 0tBzohjEofy7IlS3+PhIVczdzKuU44s+SWUojYkQrtGSh2sgjkCfFC2IRisxoAWU
> YF29FARLbimkHDTlhjr0SqeUf5z5rt7l5y7IC8kzA2ipEJQaARfu+x/cQSlivPYd
> vrgOChrNFrqAhBHX5R+5KosL2nGPGT2cWodiVuC567Kyt5+vzp2PNLBKLwS3tT7T
> iOFGjZ3Z3AmctVebWFPEILuyoX9tqz0uZJjjkkeiLHl4d4RkvRAQOqjOyi0TyvNx
> bSenOp0YMp6Sq++lvDSmN3fx1VzoTMbfA4yacCFGLaflzJADO15kVRV/PM8aPAl6
> KPv16DrhGzxMCGVMoccQNxCYl1T0QyJfFJT+ocJVQ9ZRF1ZVd7rylq7RZwocnTh7
> tQptLst5e+SC3mcVvOhU/RLYXdqbstgaM93x8tvYv2jmtV7qmFyTDc/PGxYMr4Nh
> LfvVtyZG0Yq3672FwLgjIsbxMi91fkvGMJbXYkCUJXjvXNl+q8FwrzOJo/aGiXfY
> o0YExXDpKPRVMeEx36UXWjCu+JbFu6SBiX9zBkqt0k1NoC1jplU=
> =3GI8
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: tomcat 7.0.90 ubuntu web-security.xml doesn't work.

2019-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Richard,

On 7/19/19 11:33, richard coleman wrote:
> Hi all,
> 
> Running tomcat 7.0.90, I am trying to add a security block to a
> struts 1 application to redirect *most* urls to https.  It works
> fine when I add it to the web.xml file in the
> webapps//WEB-INF/web.xml file.
> 
> That file states that I should be able to add it to a separate 
> web-security.xml file, but when I do so, tomcat *ignores* the 
> web-security.xml file.
> 
> Is there something that's *not* mentioned that I am forgetting to
> do to actually get this to work?

I think you are asking the wrong mailing list. If you are using Struts
for the redirection, then you want to ask the Struts folks why it's
not working. You might want to provide en example of your
configuration when doing so if you post over there.

You might get crickets in response since you are asking about a
product that was abandoned years ago. I feel your pain; I still use
Struts 1.x myself. :(

I've never heard of web-security.xml. Ever.

What is it you are trying to configure in web-security.xml that works
when you put it into web.xml? Why not just put it into web.xml if
that's where it works?

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0yD6MACgkQHPApP6U8
pFjuIg/+ND6tguQw6z579Tabcc3movui80Zdva4EEyMzzCaJl0kkvF8wqVdEzErG
uCOni0gwo3VflY5cdOM8cdAjcoR2iue3LrWOKQKEtuKpTuv6bGPO/HjGUBtKzMnd
0tBzohjEofy7IlS3+PhIVczdzKuU44s+SWUojYkQrtGSh2sgjkCfFC2IRisxoAWU
YF29FARLbimkHDTlhjr0SqeUf5z5rt7l5y7IC8kzA2ipEJQaARfu+x/cQSlivPYd
vrgOChrNFrqAhBHX5R+5KosL2nGPGT2cWodiVuC567Kyt5+vzp2PNLBKLwS3tT7T
iOFGjZ3Z3AmctVebWFPEILuyoX9tqz0uZJjjkkeiLHl4d4RkvRAQOqjOyi0TyvNx
bSenOp0YMp6Sq++lvDSmN3fx1VzoTMbfA4yacCFGLaflzJADO15kVRV/PM8aPAl6
KPv16DrhGzxMCGVMoccQNxCYl1T0QyJfFJT+ocJVQ9ZRF1ZVd7rylq7RZwocnTh7
tQptLst5e+SC3mcVvOhU/RLYXdqbstgaM93x8tvYv2jmtV7qmFyTDc/PGxYMr4Nh
LfvVtyZG0Yq3672FwLgjIsbxMi91fkvGMJbXYkCUJXjvXNl+q8FwrzOJo/aGiXfY
o0YExXDpKPRVMeEx36UXWjCu+JbFu6SBiX9zBkqt0k1NoC1jplU=
=3GI8
-END PGP SIGNATURE-

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



Re: OT: Tomcat on AWS for Dummies

2019-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jerry,

On 7/19/19 13:38, Jerry Malcolm wrote:
> I have had a dedicated hosted environment with WAMP and Tomcat for 
> over 15 years.  I'm very familiar with everything related to that 
> environment... apache http, mysql, dns server, the file system, 
> JAMES, and all of my management scripts that I've accumulated over 
> the years. Everything is in the same box and basically on the same 
> desktop. But now I have a client that has needs that are best met
> in an AWS environment.

Can you explain that in a little more depth? What is it about AWS that
meets their needs better?

I ask because you can provision a one-box wonder in AWS just like you
do on a physical space with a single server. You just have to use
remote-desktop to get into it, and then it's all the same.

But if they want to use RDS, auto-scaling, and other Amazon-provided
services then things can get confusing.

So the answer to your question really depends upon what the client
thinks they'll be getting by you taking your existing product "to the
cloud".

> I understand just enough AWS to be dangerous, which is not
> much I do know that it's a bunch of different modules, and I
> believe I lose the direct file system access.
That heavily depends upon how you do things. You can get yourself a
server with a disk and everything, just like you are used to doing.

> I've watched an AWS intro video and a couple of youtube videos on 
> setting up TC in AWS. But they always starts with "now that you
> have your AWS environment set up".   I am looking for something
> that explains the big picture of migrating an existing WAMP+TC to
> AWS.  I am not so naive to think that there won't be significant
> rip-up to what I have now. But I don't want to do unnecessary
> rip-up just because I don't understand where I'm heading.
> Basically, I don't know enough to know what I don't know But I
> need to start planning ahead and learning soon if I'm going to have
> any disasters in my code where I might have played it too loose
> with accessing the file system directly in my dedicated
> environment.
> 
> Has anyone been down this path before and could point me to some 
> tutorials targeted to migrating WAMP+TC to AWS? Or possible 
> hand-hold me just a little...? I'm a pretty quick learner.  I just 
> don't know where to start.
As usual, start with your requirements :)

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0yDpIACgkQHPApP6U8
pFj5GA/+Pr+CXtOGTYsZqCWVT7KYqvAulyyyZsHOvS2oaiapjrsWORYA5rzS478y
TE+rMAUc7ep0RToW1ZCAhtyKi+M1vfIwGu6qkFA6NCBWKL92I8jaFw+j/pDJ0mSJ
sfv0OGu8hAmQwy2FCpscgFR9PBKNzJN3o5OhR0cp1g0i6/J5Ci9xkn92KVAv1ZIU
WjY+WrE9tcqtASHjO/wS53YreHlXoPLSzhpbjwje/HzKkBYXRV9dRIpHLnOSNc6t
+5LhnLghVR27J3n/w1xFeO8kM3SBySuCHhUGTNCKdxMlrprxCIwZjvgLwHBxwv17
tK6NOxmuk4xsi7vrKGhR/PWYHuTMNrYkWwD3Hv2vskwqo4RioIOaseoXBGHYy/WN
iDwN6viSzSCqivP+MLBGi00Xo3LFdJZu+DMufX05SYJvRxxO6yaNMxING7zr9ubJ
ossrDNIkHSDs4J0SAvzYidfPCOUbRWvHI6dYLkqsieRk7pWp2JPSWBWKuisllBnP
VOv4IaVfZNHGE5TmkWElKE8Cbyj8xxSerFN15RjoawmwnnP9c1L8LirTi/l7GEQN
HlQfNFP+evIbGpPOrcUpZJa5sjfePeUl+jJj08DPw0djyG3K3tAcBQTO4LjqsKTC
g1phEO502BxE8v1UPTpEYXGfxhvMSirvjC37lXbTabNo3R4Tbt4=
=SUFA
-END PGP SIGNATURE-

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



Re: OT: Tomcat on AWS for Dummies

2019-07-19 Thread Martynas Jusevičius
My advice when it comes to making your setup environment-agnostic:
Docker'ize it.

I haven't used Docker on AWS, but once you have an image running
locally you can be 98% sure it's gonna run on the server (e.g.
mounting files from host can cause some differences still, so best to
avoid that).

See if it makes sense: https://aws.amazon.com/docker/

On Fri, Jul 19, 2019 at 8:39 PM Jerry Malcolm  wrote:
>
> I have had a dedicated hosted environment with WAMP and Tomcat for over
> 15 years.  I'm very familiar with everything related to that
> environment... apache http, mysql, dns server, the file system, JAMES,
> and all of my management scripts that I've accumulated over the years.
> Everything is in the same box and basically on the same desktop.  But
> now I have a client that has needs that are best met in an AWS
> environment.  I understand just enough AWS to be dangerous, which is not
> much  I do know that it's a bunch of different modules, and I
> believe I lose the direct file system access.  I've watched an AWS intro
> video and a couple of youtube videos on setting up TC in AWS.  But they
> always starts with "now that you have your AWS environment set
> up".   I am looking for something that explains the big picture of
> migrating an existing WAMP+TC to AWS.  I am not so naive to think that
> there won't be significant rip-up to what I have now.  But I don't want
> to do unnecessary rip-up just because I don't understand where I'm
> heading.  Basically, I don't know enough to know what I don't know
> But I need to start planning ahead and learning soon if I'm going to
> have any disasters in my code where I might have played it too loose
> with accessing the file system directly in my dedicated environment.
>
> Has anyone been down this path before and could point me to some
> tutorials targeted to migrating WAMP+TC to AWS? Or possible hand-hold me
> just a little...? I'm a pretty quick learner.  I just don't know where
> to start.
>
> Thanks.
>
> Jerry
>
>
> -
> 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



OT: Tomcat on AWS for Dummies

2019-07-19 Thread Jerry Malcolm
I have had a dedicated hosted environment with WAMP and Tomcat for over 
15 years.  I'm very familiar with everything related to that 
environment... apache http, mysql, dns server, the file system, JAMES, 
and all of my management scripts that I've accumulated over the years.  
Everything is in the same box and basically on the same desktop.  But 
now I have a client that has needs that are best met in an AWS 
environment.  I understand just enough AWS to be dangerous, which is not 
much  I do know that it's a bunch of different modules, and I 
believe I lose the direct file system access.  I've watched an AWS intro 
video and a couple of youtube videos on setting up TC in AWS.  But they 
always starts with "now that you have your AWS environment set 
up".   I am looking for something that explains the big picture of 
migrating an existing WAMP+TC to AWS.  I am not so naive to think that 
there won't be significant rip-up to what I have now.  But I don't want 
to do unnecessary rip-up just because I don't understand where I'm 
heading.  Basically, I don't know enough to know what I don't know  
But I need to start planning ahead and learning soon if I'm going to 
have any disasters in my code where I might have played it too loose 
with accessing the file system directly in my dedicated environment.


Has anyone been down this path before and could point me to some 
tutorials targeted to migrating WAMP+TC to AWS? Or possible hand-hold me 
just a little...? I'm a pretty quick learner.  I just don't know where 
to start.


Thanks.

Jerry


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



RE: tomcat and openjdk as windows service

2019-07-19 Thread Lemke, Michael ST/HZA-ZIC2
On July 19, 2019 5:51 PM André Warnier wrote:
>For some maybe useful background information, it may be useful to read this :
>https://cwiki.apache.org/confluence/display/TOMCAT/Windows#Windows-Q11

Thanks. Actually, I knew this as I am using procrun for an additional service, 
which also doesn't find the OpenJdk.

So doesn't this boil down to why procrun doesn't pick up the OpenJdk 
installation?

I verified that the ojdkbuild installer sets the appropriate Registry keys. Is 
this a bug in procrun or does Oracle play some additional tricks?

Michael

>
>On 19.07.2019 14:01, Michael Lemke wrote:
>> I have tomcat (9.0.22) running as a service on Windows with Oracle's Java 8. 
>> I now want to move this to OpenJdk 12 to keep current and I have quite some 
>> problems to have tomcat find the OpenJdk installation. With Oracle it just 
>> worked with the Jvm=auto option for the tomcat service. With OpenJdk I only 
>> got it to work by messing around with JAVA_HOME, which is no fun especially 
>> for services. Without it tomcat doesn't find Java or uses Oracle's if I 
>> don't remove it first.
>>
>> Now is this a tomcat problem or a OpenJdk installation problem?
>>
>> For OpenJdk I used
>>
>> https://github.com/ojdkbuild/ojdkbuild/releases/download/12.0.1-1/java-12-openjdk-12.0.1.12-1.windows.ojdkbuild.x86_64.msi
>>
>> and have the installer set the Windows Registry entries under JavaSoft
>>
>> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1
>>
>>  From what I found on the net these Registry settings changed with Java 9.
>>
>> So what am I doing wrong?
>>
>> Thanks,
>> Michael

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



Re: tomcat and openjdk as windows service

2019-07-19 Thread tomcat

Hi.
For some maybe useful background information, it may be useful to read this :
https://cwiki.apache.org/confluence/display/TOMCAT/Windows#Windows-Q11

On 19.07.2019 14:01, Lemke, Michael  ST/HZA-ZIC2 wrote:

I have tomcat (9.0.22) running as a service on Windows with Oracle's Java 8. I 
now want to move this to OpenJdk 12 to keep current and I have quite some 
problems to have tomcat find the OpenJdk installation. With Oracle it just 
worked with the Jvm=auto option for the tomcat service. With OpenJdk I only got 
it to work by messing around with JAVA_HOME, which is no fun especially for 
services. Without it tomcat doesn't find Java or uses Oracle's if I don't 
remove it first.

Now is this a tomcat problem or a OpenJdk installation problem?

For OpenJdk I used

https://github.com/ojdkbuild/ojdkbuild/releases/download/12.0.1-1/java-12-openjdk-12.0.1.12-1.windows.ojdkbuild.x86_64.msi

and have the installer set the Windows Registry entries under JavaSoft

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1

 From what I found on the net these Registry settings changed with Java 9.

So what am I doing wrong?

Thanks,
Michael

-
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



tomcat 7.0.90 ubuntu web-security.xml doesn't work.

2019-07-19 Thread richard coleman
Hi all,

Running tomcat 7.0.90, I am trying to add a security block to a struts 1
application to redirect *most* urls to https.  It works fine when I add it
to the web.xml file in the webapps//WEB-INF/web.xml file.

That file states that I should be able to add it to a separate
web-security.xml file, but when I do so, tomcat *ignores* the
web-security.xml file.

Is there something that's *not* mentioned that I am forgetting to do to
actually get this to work?

Thanks,

rik.


Re: tomcat and openjdk as windows service

2019-07-19 Thread Konstantin Kolinko
пт, 19 июл. 2019 г. в 15:02, Lemke, Michael ST/HZA-ZIC2
:
>
> I have tomcat (9.0.22) running as a service on Windows with Oracle's Java 8. 
> I now want to move this to OpenJdk 12 to keep current and I have quite some 
> problems to have tomcat find the OpenJdk installation. With Oracle it just 
> worked with the Jvm=auto option for the tomcat service. With OpenJdk I only 
> got it to work by messing around with JAVA_HOME, which is no fun especially 
> for services. Without it tomcat doesn't find Java or uses Oracle's if I don't 
> remove it first.
>
> Now is this a tomcat problem or a OpenJdk installation problem?
>
> For OpenJdk I used
>
> https://github.com/ojdkbuild/ojdkbuild/releases/download/12.0.1-1/java-12-openjdk-12.0.1.12-1.windows.ojdkbuild.x86_64.msi
>
> and have the installer set the Windows Registry entries under JavaSoft
>
> HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1
>
> From what I found on the net these Registry settings changed with Java 9.
>

I use OpenJDK 12.0.1 on Windows with Tomcat 9, successfully.

I am using a build of OpenJDK that was packed as a zip file, so that
is from a different vendor than yours.
I cannot comment on all steps of your experience with installer, but
here are a few comments/ pointers


1. I installed Tomcat as a service using "service.bat" file included
with Tomcat.

The JAVA_HOME environment variable is used by "service.bat" file only.
I set it at command prompt before running the service.bat file. E.g.

set JAVA_HOME=C:\Programs\java-12

There is no need to set the variable globally. Your frustration is uncalled for.

2. The path to Java can be edited via a GUI configuration dialog for
the service runner. The dialog is shown when you run "tomcat9w.exe".


3. The service runner is provided by Apache Commons Daemon project and
is used by Apache Tomcat (and other projects) "as is". (The service
runner for Windows is called "Procrun" within that project.)

http://commons.apache.org/proper/commons-daemon/procrun.html

"tomcat9.exe" and "tomcat9w.exe" are renamed copies of "prunsrv.exe"
and "prunmgr.exe" respectively.

I do not remember how procrun searches for Java jvm.dll. I's been a
long time since I studied their source code. If that algorithm could
be improved, it is an issue with Apache Commons Daemon project.

If some documentation is lacking, it could be improved in Apache Tomcat project.

Best regards,
Konstantin Kolinko

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



tomcat and openjdk as windows service

2019-07-19 Thread Lemke, Michael ST/HZA-ZIC2
I have tomcat (9.0.22) running as a service on Windows with Oracle's Java 8. I 
now want to move this to OpenJdk 12 to keep current and I have quite some 
problems to have tomcat find the OpenJdk installation. With Oracle it just 
worked with the Jvm=auto option for the tomcat service. With OpenJdk I only got 
it to work by messing around with JAVA_HOME, which is no fun especially for 
services. Without it tomcat doesn't find Java or uses Oracle's if I don't 
remove it first.

Now is this a tomcat problem or a OpenJdk installation problem?

For OpenJdk I used 

https://github.com/ojdkbuild/ojdkbuild/releases/download/12.0.1-1/java-12-openjdk-12.0.1.12-1.windows.ojdkbuild.x86_64.msi

and have the installer set the Windows Registry entries under JavaSoft

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\12.0.1

>From what I found on the net these Registry settings changed with Java 9. 

So what am I doing wrong?

Thanks,
Michael

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



Re: WAR file not deploying correctly

2019-07-19 Thread tomcat

On 19.07.2019 11:47, Victor WILLART wrote:

Hi everybody,


I am using Tomcat 8.0, and I am struggling to replace and deploy a WAR file..


I made a new WAR file, named it like the old one, and replaced it in my webapps folder. 
But the new generated folder for my application is just containing a single folder 
"config" which is empty. All the other folders and files are missing … I tried 
also to deploy it through the Tomcat Manager and it happened the same.


I don't think my war file is wrong since I have a back up folder of my app that 
was working perfectly before trying this, and the back up WAR file isn't 
working neither.  Only replacing the deployed folder by the deployed folder 
from back up makes my app work again correctly.


If you have any hints or guesses about this, I would gladly try them.




Could be some permissions problem.
What platform is it ?

(Like : when you do it "by hand", you are logged-in as a user with sufficient permissions 
to overwrite existing files/create new ones. But when tomcat tries to do the same, it 
cannot because its own permissions are insufficient.

There should be something in the logfiles though. Have you looked there ?)



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



WAR file not deploying correctly

2019-07-19 Thread Victor WILLART
Hi everybody,


I am using Tomcat 8.0, and I am struggling to replace and deploy a WAR file.


I made a new WAR file, named it like the old one, and replaced it in my webapps 
folder. But the new generated folder for my application is just containing a 
single folder "config" which is empty. All the other folders and files are 
missing … I tried also to deploy it through the Tomcat Manager and it happened 
the same.


I don't think my war file is wrong since I have a back up folder of my app that 
was working perfectly before trying this, and the back up WAR file isn't 
working neither.  Only replacing the deployed folder by the deployed folder 
from back up makes my app work again correctly.


If you have any hints or guesses about this, I would gladly try them.


Regards,


Victor