You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jasmin Ćatić <ja...@gmail.com> on 2022/07/15 09:22:06 UTC

Publishing Tomcat webapp

Hello,

Can someone please give me a step by step guide on how to make my tomcat
webapp available online with a domain name.
Thanks.

Regards,
JC

Re: AW: Publishing Tomcat webapp

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Jasmin,

On 7/21/22 17:03, Jasmin Ćatić wrote:
> I still didn't manage to configure SSL for my Tomcat. I tried a whole bunch
> of tutorials and solutions but nothing worked for me.
> Once again I will provide you with what I have, so if anybody can help me I
> would really appreciate it.

I don't see anything posted here. Please post your <Connector> 
configuration (minus any secrets) and the output of "keytool -list" for 
your keystore (if you use one) or confirmation that your PEM files exist 
and actually contain what is expected. (Do NOT post the keys here!)

> If anyone has a free time I will provide you
> with remote access to configure it together with me.

If you want realtime help, you are going to have to pay someone. Lots of 
people here are happy to help for free, but on their schedule.

> So, I have a subdomain testjc.fgu.ba created in a cpanel, and it
> automatically generated the SSL certificate for the testjc.fgu.ba and
> www.testjc.fgu.ba. I have a certificate.crt, private.key and ca_bundle.crt
> files in my cpanel.
> The subdomain has an A record pointing to my PC IP address where I
> installed Tomcat instance and it is currently running.
> You can access it via http, but I want to do the encryption and be able to
> have https access to my Tomcat.
> What should I do next?

Tell us what you did with the files you have above.

-chris

> čet, 21. srp 2022. u 14:25 Thomas Hoffmann (Speed4Trade GmbH)
> <Th...@speed4trade.com.invalid> napisao je:
> 
>>
>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Christopher Schultz <ch...@christopherschultz.net>
>>> Gesendet: Donnerstag, 21. Juli 2022 14:11
>>> An: users@tomcat.apache.org
>>> Betreff: Re: AW: Publishing Tomcat webapp
>>>
>>> Thomas,
>>>
>>> On 7/17/22 03:07, Thomas Hoffmann (Speed4Trade GmbH) wrote:
>>>> Hello,
>>>>
>>>>> -----Ursprüngliche Nachricht-----
>>>>> Von: Aryeh Friedman <ar...@gmail.com>
>>>>> Gesendet: Sonntag, 17. Juli 2022 08:43
>>>>> An: Tomcat Users List <us...@tomcat.apache.org>
>>>>> Betreff: Re: Publishing Tomcat webapp
>>>>>
>>>>> On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
>>>>> <ar...@gmail.com>
>>>>> wrote:
>>>>>> Once you have it pointing to that domain just upload the war file to
>>>>>> it
>>>>> and give people the link.
>>>>>
>>>>> Small wording correction... I mean upload the war file as being a
>>>>> part of the webapp and/or a part of an other webapp you have for
>>> downloading...
>>>>> take a look at the download section of the site I list in my
>> signature.
>>>>>
>>>>> --
>>>>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
>>>>
>>>> Usually you need 2 things:
>>>> 1) A webserver or webspace. This includes a public IP address
>>>> 2) A domain. You can buy it online.
>>>>
>>>> When you own a domain, you have access to the DNS settings. Create an
>>> A-Record with the domain-name and point it to the IP address of your
>>> server.
>>>> If an A-records already exists, modify it to point to the IP address
>> of the
>>> server.
>>>>
>>>> Install tomcat on the webserver and install your web-application.
>>>> Tomcat listens per default on all ports, so no special configuration
>> needed
>>> (only if you host multiple domains on that server).
>>>
>>> s/ports/interfaces/
>>>
>>> -chris
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>> Thanks for correcting my typo. Listens on all *interfaces* of course, not
>> ports 😊
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> 

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


Re: AW: Publishing Tomcat webapp

Posted by Jasmin Ćatić <ja...@gmail.com>.
Hello again,

I still didn't manage to configure SSL for my Tomcat. I tried a whole bunch
of tutorials and solutions but nothing worked for me.
Once again I will provide you with what I have, so if anybody can help me I
would really appreciate it. If anyone has a free time I will provide you
with remote access to configure it together with me.
So, I have a subdomain testjc.fgu.ba created in a cpanel, and it
automatically generated the SSL certificate for the testjc.fgu.ba and
www.testjc.fgu.ba. I have a certificate.crt, private.key and ca_bundle.crt
files in my cpanel.
The subdomain has an A record pointing to my PC IP address where I
installed Tomcat instance and it is currently running.
You can access it via http, but I want to do the encryption and be able to
have https access to my Tomcat.
What should I do next?

Sincerely,
JC

čet, 21. srp 2022. u 14:25 Thomas Hoffmann (Speed4Trade GmbH)
<Th...@speed4trade.com.invalid> napisao je:

>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Christopher Schultz <ch...@christopherschultz.net>
> > Gesendet: Donnerstag, 21. Juli 2022 14:11
> > An: users@tomcat.apache.org
> > Betreff: Re: AW: Publishing Tomcat webapp
> >
> > Thomas,
> >
> > On 7/17/22 03:07, Thomas Hoffmann (Speed4Trade GmbH) wrote:
> > > Hello,
> > >
> > >> -----Ursprüngliche Nachricht-----
> > >> Von: Aryeh Friedman <ar...@gmail.com>
> > >> Gesendet: Sonntag, 17. Juli 2022 08:43
> > >> An: Tomcat Users List <us...@tomcat.apache.org>
> > >> Betreff: Re: Publishing Tomcat webapp
> > >>
> > >> On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
> > >> <ar...@gmail.com>
> > >> wrote:
> > >>> Once you have it pointing to that domain just upload the war file to
> > >>> it
> > >> and give people the link.
> > >>
> > >> Small wording correction... I mean upload the war file as being a
> > >> part of the webapp and/or a part of an other webapp you have for
> > downloading...
> > >> take a look at the download section of the site I list in my
> signature.
> > >>
> > >> --
> > >> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> > >
> > > Usually you need 2 things:
> > > 1) A webserver or webspace. This includes a public IP address
> > > 2) A domain. You can buy it online.
> > >
> > > When you own a domain, you have access to the DNS settings. Create an
> > A-Record with the domain-name and point it to the IP address of your
> > server.
> > > If an A-records already exists, modify it to point to the IP address
> of the
> > server.
> > >
> > > Install tomcat on the webserver and install your web-application.
> > > Tomcat listens per default on all ports, so no special configuration
> needed
> > (only if you host multiple domains on that server).
> >
> > s/ports/interfaces/
> >
> > -chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
>
> Thanks for correcting my typo. Listens on all *interfaces* of course, not
> ports 😊
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

AW: AW: Publishing Tomcat webapp

Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.

> -----Ursprüngliche Nachricht-----
> Von: Christopher Schultz <ch...@christopherschultz.net>
> Gesendet: Donnerstag, 21. Juli 2022 14:11
> An: users@tomcat.apache.org
> Betreff: Re: AW: Publishing Tomcat webapp
> 
> Thomas,
> 
> On 7/17/22 03:07, Thomas Hoffmann (Speed4Trade GmbH) wrote:
> > Hello,
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Aryeh Friedman <ar...@gmail.com>
> >> Gesendet: Sonntag, 17. Juli 2022 08:43
> >> An: Tomcat Users List <us...@tomcat.apache.org>
> >> Betreff: Re: Publishing Tomcat webapp
> >>
> >> On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
> >> <ar...@gmail.com>
> >> wrote:
> >>> Once you have it pointing to that domain just upload the war file to
> >>> it
> >> and give people the link.
> >>
> >> Small wording correction... I mean upload the war file as being a
> >> part of the webapp and/or a part of an other webapp you have for
> downloading...
> >> take a look at the download section of the site I list in my signature.
> >>
> >> --
> >> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> >
> > Usually you need 2 things:
> > 1) A webserver or webspace. This includes a public IP address
> > 2) A domain. You can buy it online.
> >
> > When you own a domain, you have access to the DNS settings. Create an
> A-Record with the domain-name and point it to the IP address of your
> server.
> > If an A-records already exists, modify it to point to the IP address of the
> server.
> >
> > Install tomcat on the webserver and install your web-application.
> > Tomcat listens per default on all ports, so no special configuration needed
> (only if you host multiple domains on that server).
> 
> s/ports/interfaces/
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

Thanks for correcting my typo. Listens on all *interfaces* of course, not ports 😊

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


Re: AW: Publishing Tomcat webapp

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Thomas,

On 7/17/22 03:07, Thomas Hoffmann (Speed4Trade GmbH) wrote:
> Hello,
> 
>> -----Ursprüngliche Nachricht-----
>> Von: Aryeh Friedman <ar...@gmail.com>
>> Gesendet: Sonntag, 17. Juli 2022 08:43
>> An: Tomcat Users List <us...@tomcat.apache.org>
>> Betreff: Re: Publishing Tomcat webapp
>>
>> On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
>> <ar...@gmail.com>
>> wrote:
>>> Once you have it pointing to that domain just upload the war file to
>>> it
>> and give people the link.
>>
>> Small wording correction... I mean upload the war file as being a part of the
>> webapp and/or a part of an other webapp you have for downloading...
>> take a look at the download section of the site I list in my signature.
>>
>> --
>> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> 
> Usually you need 2 things:
> 1) A webserver or webspace. This includes a public IP address
> 2) A domain. You can buy it online.
> 
> When you own a domain, you have access to the DNS settings. Create an A-Record with the domain-name and point it to the IP address of your server.
> If an A-records already exists, modify it to point to the IP address of the server.
> 
> Install tomcat on the webserver and install your web-application.
> Tomcat listens per default on all ports, so no special configuration needed (only if you host multiple domains on that server).

s/ports/interfaces/

-chris

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


AW: Publishing Tomcat webapp

Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
Hello,

> -----Ursprüngliche Nachricht-----
> Von: Jasmin Ćatić <ja...@gmail.com>
> Gesendet: Montag, 18. Juli 2022 14:12
> An: Tomcat Users List <us...@tomcat.apache.org>
> Betreff: Re: Publishing Tomcat webapp
> 
> Now I have another setback.
> I have my tomcat running on the domain name www.mydomain.com and I
> have an SSL certificate on this domain (CA_BUNDLE, Certificate and Key) in
> my CPanel.
> How to configure Tomcat to use this SSL and HTTPS protocol.
> 
> Thanks again for your help

The configuration in detail depends on the Tomcat version you are using.
In principal, you have to add a connector element within the server.xml

For tomcat 9 e.g.: https://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html  

The connector element has attributes for the private and public key (and intermediates).
After configuration I recommend to check SSL configuration via SSL-Labs, they offer an online-check.


> 
> pon, 18. srp 2022. u 08:24 Jasmin Ćatić <ja...@gmail.com> napisao
> je:
> 
> > Thank you very much. I have done it successfully.
> > Best regards
> > JC
> >
> > ned, 17. srp 2022. u 09:08 Thomas Hoffmann (Speed4Trade GmbH)
> > <Th...@speed4trade.com.invalid> napisao je:
> >
> >> Hello,
> >>
> >> > -----Ursprüngliche Nachricht-----
> >> > Von: Aryeh Friedman <ar...@gmail.com>
> >> > Gesendet: Sonntag, 17. Juli 2022 08:43
> >> > An: Tomcat Users List <us...@tomcat.apache.org>
> >> > Betreff: Re: Publishing Tomcat webapp
> >> >
> >> > On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
> >> > <ar...@gmail.com>
> >> > wrote:
> >> > > Once you have it pointing to that domain just upload the war file
> >> > > to it
> >> > and give people the link.
> >> >
> >> > Small wording correction... I mean upload the war file as being a
> >> > part
> >> of the
> >> > webapp and/or a part of an other webapp you have for downloading...
> >> > take a look at the download section of the site I list in my signature.
> >> >
> >> > --
> >> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> >>
> >> Usually you need 2 things:
> >> 1) A webserver or webspace. This includes a public IP address
> >> 2) A domain. You can buy it online.
> >>
> >> When you own a domain, you have access to the DNS settings. Create an
> >> A-Record with the domain-name and point it to the IP address of your
> server.
> >> If an A-records already exists, modify it to point to the IP address
> >> of the server.
> >>
> >> Install tomcat on the webserver and install your web-application.
> >> Tomcat listens per default on all ports, so no special configuration
> >> needed (only if you host multiple domains on that server).
> >>
> >

Re: Publishing Tomcat webapp

Posted by Aryeh Friedman <ar...@gmail.com>.
No because it assumes lets crypt can work on your platform and it
assumes you are using docker.   Where is the method I posted it the
canonical method that requires nothing but running tomcat (the JRE has
all the tools you want in it)

On Mon, Jul 18, 2022 at 9:18 AM Martynas Jusevičius
<ma...@atomgraph.com> wrote:
>
> Hi,
>
> Wouldn’t this setup be easier to deploy as a Docker container?
> We have an image with SSL server cert support:
> https://github.com/AtomGraph/letsencrypt-tomcat
>
>
> On Mon, 18 Jul 2022 at 16.09, Aryeh Friedman <ar...@gmail.com>
> wrote:
>
> > Here are the steps to installing a SSL cert (it varies slightly based
> > on who your certificate authority [CA] is):
> >
> > Generate a CSR with keytool (it must be key tool despite what the
> > tomcat docs say since for whatever reason it refuses to import from
> > any other SSL tool):
> >
> > keytool –keystore clientkeystore –genkey –alias mykey
> >
> > Submit the above to your CA (they will give you directions on how to
> > submit it) and have them issued a signed cert for it
> >
> > The signed cert usually comes with some intermediate files (this is
> > the part that varies by CA) which you have to apply in order to the
> > keystore (the following is the set of files I use):
> >
> > keytool -noprompt -importcert -alias AAACertificateServices -file
> > AAACertificateServices.crt -keystore sslStore
> >
> > keytool -importcert -trustcacerts -keystore sslStore -file
> > USERTrustRSAAAACA.crt -alias USERTrustRSAAAACA
> >
> > keytool -importcert -trustcacerts -keystore sslStore -file
> > /SectigoRSAOrganizationValidationSecureServerCA.crt -alias
> > SectigoRSAOrganizationValidationSecureServerCA
> >
> > keytool -importcert -trustcacerts -alias mykey (this *MUST* match the
> > alias of the CSR you submitted to the CA)
> >                 -file 1008013344repl_2.crt -keystore sslStore
> >
> > Modify the tomcat server.xml to uncomment out the right https line in
> > the config and tell it where to find the sslStore (some OS's force you
> > to put it in $TOMCAT_HOME)... for example I do the following:
> >
> > <Connector
> >            protocol="org.apache.coyote.http11.Http11NioProtocol"
> >            port="443" maxThreads="200"
> >            scheme="https" secure="true" SSLEnabled="true"
> >            keystoreFile="/usr/local/apache-tomcat-9.0/keystore"
> > keystorePass="mySuperSecretPassword"
> >            clientAuth="false" sslProtocol="TLS"
> > sslEnabledProtocols="TLSv1.2"/>
> >
> > Restart tomcat and you should have SSL how if you go to https if you
> > on port 8080 you will likely want to put in 8443 not 443
> >
> >
> > References:
> > https://docs.oracle.com/cd/E19509-01/820-3503/ggezu/index.html
> >
> >
> > On Mon, Jul 18, 2022 at 8:11 AM Jasmin Ćatić <ja...@gmail.com>
> > wrote:
> > >
> > > Now I have another setback.
> > > I have my tomcat running on the domain name www.mydomain.com and I have
> > an
> > > SSL certificate on this domain (CA_BUNDLE, Certificate and Key) in my
> > > CPanel.
> > > How to configure Tomcat to use this SSL and HTTPS protocol.
> > >
> > > Thanks again for your help
> > >
> > > pon, 18. srp 2022. u 08:24 Jasmin Ćatić <ja...@gmail.com>
> > napisao
> > > je:
> > >
> > > > Thank you very much. I have done it successfully.
> > > > Best regards
> > > > JC
> > > >
> > > > ned, 17. srp 2022. u 09:08 Thomas Hoffmann (Speed4Trade GmbH)
> > > > <Th...@speed4trade.com.invalid> napisao je:
> > > >
> > > >> Hello,
> > > >>
> > > >> > -----Ursprüngliche Nachricht-----
> > > >> > Von: Aryeh Friedman <ar...@gmail.com>
> > > >> > Gesendet: Sonntag, 17. Juli 2022 08:43
> > > >> > An: Tomcat Users List <us...@tomcat.apache.org>
> > > >> > Betreff: Re: Publishing Tomcat webapp
> > > >> >
> > > >> > On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
> > > >> > <ar...@gmail.com>
> > > >> > wrote:
> > > >> > > Once you have it pointing to that domain just upload the war file
> > to
> > > >> > > it
> > > >> > and give people the link.
> > > >> >
> > > >> > Small wording correction... I mean upload the war file as being a
> > part
> > > >> of the
> > > >> > webapp and/or a part of an other webapp you have for downloading...
> > > >> > take a look at the download section of the site I list in my
> > signature.
> > > >> >
> > > >> > --
> > > >> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> > > >>
> > > >> Usually you need 2 things:
> > > >> 1) A webserver or webspace. This includes a public IP address
> > > >> 2) A domain. You can buy it online.
> > > >>
> > > >> When you own a domain, you have access to the DNS settings. Create an
> > > >> A-Record with the domain-name and point it to the IP address of your
> > server.
> > > >> If an A-records already exists, modify it to point to the IP address
> > of
> > > >> the server.
> > > >>
> > > >> Install tomcat on the webserver and install your web-application.
> > > >> Tomcat listens per default on all ports, so no special configuration
> > > >> needed (only if you host multiple domains on that server).
> > > >>
> > > >
> >
> >
> >
> > --
> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >



-- 
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org

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


Re: Publishing Tomcat webapp

Posted by Martynas Jusevičius <ma...@atomgraph.com>.
Hi,

Wouldn’t this setup be easier to deploy as a Docker container?
We have an image with SSL server cert support:
https://github.com/AtomGraph/letsencrypt-tomcat


On Mon, 18 Jul 2022 at 16.09, Aryeh Friedman <ar...@gmail.com>
wrote:

> Here are the steps to installing a SSL cert (it varies slightly based
> on who your certificate authority [CA] is):
>
> Generate a CSR with keytool (it must be key tool despite what the
> tomcat docs say since for whatever reason it refuses to import from
> any other SSL tool):
>
> keytool –keystore clientkeystore –genkey –alias mykey
>
> Submit the above to your CA (they will give you directions on how to
> submit it) and have them issued a signed cert for it
>
> The signed cert usually comes with some intermediate files (this is
> the part that varies by CA) which you have to apply in order to the
> keystore (the following is the set of files I use):
>
> keytool -noprompt -importcert -alias AAACertificateServices -file
> AAACertificateServices.crt -keystore sslStore
>
> keytool -importcert -trustcacerts -keystore sslStore -file
> USERTrustRSAAAACA.crt -alias USERTrustRSAAAACA
>
> keytool -importcert -trustcacerts -keystore sslStore -file
> /SectigoRSAOrganizationValidationSecureServerCA.crt -alias
> SectigoRSAOrganizationValidationSecureServerCA
>
> keytool -importcert -trustcacerts -alias mykey (this *MUST* match the
> alias of the CSR you submitted to the CA)
>                 -file 1008013344repl_2.crt -keystore sslStore
>
> Modify the tomcat server.xml to uncomment out the right https line in
> the config and tell it where to find the sslStore (some OS's force you
> to put it in $TOMCAT_HOME)... for example I do the following:
>
> <Connector
>            protocol="org.apache.coyote.http11.Http11NioProtocol"
>            port="443" maxThreads="200"
>            scheme="https" secure="true" SSLEnabled="true"
>            keystoreFile="/usr/local/apache-tomcat-9.0/keystore"
> keystorePass="mySuperSecretPassword"
>            clientAuth="false" sslProtocol="TLS"
> sslEnabledProtocols="TLSv1.2"/>
>
> Restart tomcat and you should have SSL how if you go to https if you
> on port 8080 you will likely want to put in 8443 not 443
>
>
> References:
> https://docs.oracle.com/cd/E19509-01/820-3503/ggezu/index.html
>
>
> On Mon, Jul 18, 2022 at 8:11 AM Jasmin Ćatić <ja...@gmail.com>
> wrote:
> >
> > Now I have another setback.
> > I have my tomcat running on the domain name www.mydomain.com and I have
> an
> > SSL certificate on this domain (CA_BUNDLE, Certificate and Key) in my
> > CPanel.
> > How to configure Tomcat to use this SSL and HTTPS protocol.
> >
> > Thanks again for your help
> >
> > pon, 18. srp 2022. u 08:24 Jasmin Ćatić <ja...@gmail.com>
> napisao
> > je:
> >
> > > Thank you very much. I have done it successfully.
> > > Best regards
> > > JC
> > >
> > > ned, 17. srp 2022. u 09:08 Thomas Hoffmann (Speed4Trade GmbH)
> > > <Th...@speed4trade.com.invalid> napisao je:
> > >
> > >> Hello,
> > >>
> > >> > -----Ursprüngliche Nachricht-----
> > >> > Von: Aryeh Friedman <ar...@gmail.com>
> > >> > Gesendet: Sonntag, 17. Juli 2022 08:43
> > >> > An: Tomcat Users List <us...@tomcat.apache.org>
> > >> > Betreff: Re: Publishing Tomcat webapp
> > >> >
> > >> > On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
> > >> > <ar...@gmail.com>
> > >> > wrote:
> > >> > > Once you have it pointing to that domain just upload the war file
> to
> > >> > > it
> > >> > and give people the link.
> > >> >
> > >> > Small wording correction... I mean upload the war file as being a
> part
> > >> of the
> > >> > webapp and/or a part of an other webapp you have for downloading...
> > >> > take a look at the download section of the site I list in my
> signature.
> > >> >
> > >> > --
> > >> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> > >>
> > >> Usually you need 2 things:
> > >> 1) A webserver or webspace. This includes a public IP address
> > >> 2) A domain. You can buy it online.
> > >>
> > >> When you own a domain, you have access to the DNS settings. Create an
> > >> A-Record with the domain-name and point it to the IP address of your
> server.
> > >> If an A-records already exists, modify it to point to the IP address
> of
> > >> the server.
> > >>
> > >> Install tomcat on the webserver and install your web-application.
> > >> Tomcat listens per default on all ports, so no special configuration
> > >> needed (only if you host multiple domains on that server).
> > >>
> > >
>
>
>
> --
> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Publishing Tomcat webapp

Posted by Jasmin Ćatić <ja...@gmail.com>.
Hello again,

I still didn't manage to configure SSL for my Tomcat. I tried a whole bunch
of tutorials and solutions but nothing worked for me.
Once again I will provide you with what I have, so if anybody can help me I
would really appreciate it. If anyone has a free time I will provide you
with remote access to configure it together with me.
So, I have a subdomain testjc.fgu.ba created in a cpanel, and it
automatically generated the SSL certificate for the testjc.fgu.ba and
www.testjc.fgu.ba. I have a certificate.crt, private.key and ca_bundle.crt
files in my cpanel.
The subdomain has an A record pointing to my PC IP address where I
installed Tomcat instance and it is currently running.
You can access it via http, but I want to do the encryption and be able to
have https access to my Tomcat.
What should I do next?

Sincerely,
JC


čet, 21. srp 2022. u 14:15 Christopher Schultz <ch...@christopherschultz.net>
napisao je:

> Aryeh,
>
> On 7/18/22 09:08, Aryeh Friedman wrote:
> > Here are the steps to installing a SSL cert (it varies slightly based
> > on who your certificate authority [CA] is):
> >
> > Generate a CSR
>
> Stop. The OP already has a key, cert, and chain. None of this is necessary.
>
> > [..] with keytool (it must be key tool despite what the
> > tomcat docs say since for whatever reason it refuses to import from
> > any other SSL tool):
> >
> > keytool –keystore clientkeystore –genkey –alias mykey
> >
> > Submit the above to your CA (they will give you directions on how to
> > submit it) and have them issued a signed cert for it
> >
> > The signed cert usually comes with some intermediate files (this is
> > the part that varies by CA) which you have to apply in order to the
> > keystore (the following is the set of files I use):
> >
>
> This may or may not be necessary, depending upon what CPanel is willing
> to give to you.
>
> > keytool -noprompt -importcert -alias AAACertificateServices -file
> > AAACertificateServices.crt -keystore sslStore
> >
> > keytool -importcert -trustcacerts -keystore sslStore -file
> > USERTrustRSAAAACA.crt -alias USERTrustRSAAAACA
> >
> > keytool -importcert -trustcacerts -keystore sslStore -file
> > /SectigoRSAOrganizationValidationSecureServerCA.crt -alias
> > SectigoRSAOrganizationValidationSecureServerCA
> >
> > keytool -importcert -trustcacerts -alias mykey (this *MUST* match the
> > alias of the CSR you submitted to the CA)
> >                  -file 1008013344repl_2.crt -keystore sslStore
> >
> > Modify the tomcat server.xml to uncomment out the right https line in
> > the config and tell it where to find the sslStore (some OS's force you
> > to put it in $TOMCAT_HOME)... for example I do the following:
> >
> > <Connector
> >             protocol="org.apache.coyote.http11.Http11NioProtocol"
> >             port="443" maxThreads="200"
> >             scheme="https" secure="true" SSLEnabled="true"
> >             keystoreFile="/usr/local/apache-tomcat-9.0/keystore"
> > keystorePass="mySuperSecretPassword"
> >             clientAuth="false" sslProtocol="TLS"
> sslEnabledProtocols="TLSv1.2"/>
>
> A modern configuration would use <SSLHostConfig>s and <Certificate>s,
> which I'd highly recommend doing.
>
> > Restart tomcat and you should have SSL how if you go to https if you
> > on port 8080 you will likely want to put in 8443 not 443
>
> I disagree: using 443 is what the whole world expects for a
> publicly-accessible web site using https.
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Publishing Tomcat webapp

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Aryeh,

On 7/18/22 09:08, Aryeh Friedman wrote:
> Here are the steps to installing a SSL cert (it varies slightly based
> on who your certificate authority [CA] is):
> 
> Generate a CSR

Stop. The OP already has a key, cert, and chain. None of this is necessary.

> [..] with keytool (it must be key tool despite what the
> tomcat docs say since for whatever reason it refuses to import from
> any other SSL tool):
> 
> keytool –keystore clientkeystore –genkey –alias mykey
> 
> Submit the above to your CA (they will give you directions on how to
> submit it) and have them issued a signed cert for it
> 
> The signed cert usually comes with some intermediate files (this is
> the part that varies by CA) which you have to apply in order to the
> keystore (the following is the set of files I use):
> 

This may or may not be necessary, depending upon what CPanel is willing 
to give to you.

> keytool -noprompt -importcert -alias AAACertificateServices -file
> AAACertificateServices.crt -keystore sslStore
> 
> keytool -importcert -trustcacerts -keystore sslStore -file
> USERTrustRSAAAACA.crt -alias USERTrustRSAAAACA
> 
> keytool -importcert -trustcacerts -keystore sslStore -file
> /SectigoRSAOrganizationValidationSecureServerCA.crt -alias
> SectigoRSAOrganizationValidationSecureServerCA
> 
> keytool -importcert -trustcacerts -alias mykey (this *MUST* match the
> alias of the CSR you submitted to the CA)
>                  -file 1008013344repl_2.crt -keystore sslStore
> 
> Modify the tomcat server.xml to uncomment out the right https line in
> the config and tell it where to find the sslStore (some OS's force you
> to put it in $TOMCAT_HOME)... for example I do the following:
> 
> <Connector
>             protocol="org.apache.coyote.http11.Http11NioProtocol"
>             port="443" maxThreads="200"
>             scheme="https" secure="true" SSLEnabled="true"
>             keystoreFile="/usr/local/apache-tomcat-9.0/keystore"
> keystorePass="mySuperSecretPassword"
>             clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2"/>

A modern configuration would use <SSLHostConfig>s and <Certificate>s, 
which I'd highly recommend doing.

> Restart tomcat and you should have SSL how if you go to https if you
> on port 8080 you will likely want to put in 8443 not 443

I disagree: using 443 is what the whole world expects for a 
publicly-accessible web site using https.

-chris

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


Re: Publishing Tomcat webapp

Posted by Aryeh Friedman <ar...@gmail.com>.
Here are the steps to installing a SSL cert (it varies slightly based
on who your certificate authority [CA] is):

Generate a CSR with keytool (it must be key tool despite what the
tomcat docs say since for whatever reason it refuses to import from
any other SSL tool):

keytool –keystore clientkeystore –genkey –alias mykey

Submit the above to your CA (they will give you directions on how to
submit it) and have them issued a signed cert for it

The signed cert usually comes with some intermediate files (this is
the part that varies by CA) which you have to apply in order to the
keystore (the following is the set of files I use):

keytool -noprompt -importcert -alias AAACertificateServices -file
AAACertificateServices.crt -keystore sslStore

keytool -importcert -trustcacerts -keystore sslStore -file
USERTrustRSAAAACA.crt -alias USERTrustRSAAAACA

keytool -importcert -trustcacerts -keystore sslStore -file
/SectigoRSAOrganizationValidationSecureServerCA.crt -alias
SectigoRSAOrganizationValidationSecureServerCA

keytool -importcert -trustcacerts -alias mykey (this *MUST* match the
alias of the CSR you submitted to the CA)
                -file 1008013344repl_2.crt -keystore sslStore

Modify the tomcat server.xml to uncomment out the right https line in
the config and tell it where to find the sslStore (some OS's force you
to put it in $TOMCAT_HOME)... for example I do the following:

<Connector
           protocol="org.apache.coyote.http11.Http11NioProtocol"
           port="443" maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           keystoreFile="/usr/local/apache-tomcat-9.0/keystore"
keystorePass="mySuperSecretPassword"
           clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2"/>

Restart tomcat and you should have SSL how if you go to https if you
on port 8080 you will likely want to put in 8443 not 443


References:
https://docs.oracle.com/cd/E19509-01/820-3503/ggezu/index.html


On Mon, Jul 18, 2022 at 8:11 AM Jasmin Ćatić <ja...@gmail.com> wrote:
>
> Now I have another setback.
> I have my tomcat running on the domain name www.mydomain.com and I have an
> SSL certificate on this domain (CA_BUNDLE, Certificate and Key) in my
> CPanel.
> How to configure Tomcat to use this SSL and HTTPS protocol.
>
> Thanks again for your help
>
> pon, 18. srp 2022. u 08:24 Jasmin Ćatić <ja...@gmail.com> napisao
> je:
>
> > Thank you very much. I have done it successfully.
> > Best regards
> > JC
> >
> > ned, 17. srp 2022. u 09:08 Thomas Hoffmann (Speed4Trade GmbH)
> > <Th...@speed4trade.com.invalid> napisao je:
> >
> >> Hello,
> >>
> >> > -----Ursprüngliche Nachricht-----
> >> > Von: Aryeh Friedman <ar...@gmail.com>
> >> > Gesendet: Sonntag, 17. Juli 2022 08:43
> >> > An: Tomcat Users List <us...@tomcat.apache.org>
> >> > Betreff: Re: Publishing Tomcat webapp
> >> >
> >> > On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
> >> > <ar...@gmail.com>
> >> > wrote:
> >> > > Once you have it pointing to that domain just upload the war file to
> >> > > it
> >> > and give people the link.
> >> >
> >> > Small wording correction... I mean upload the war file as being a part
> >> of the
> >> > webapp and/or a part of an other webapp you have for downloading...
> >> > take a look at the download section of the site I list in my signature.
> >> >
> >> > --
> >> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> >>
> >> Usually you need 2 things:
> >> 1) A webserver or webspace. This includes a public IP address
> >> 2) A domain. You can buy it online.
> >>
> >> When you own a domain, you have access to the DNS settings. Create an
> >> A-Record with the domain-name and point it to the IP address of your server.
> >> If an A-records already exists, modify it to point to the IP address of
> >> the server.
> >>
> >> Install tomcat on the webserver and install your web-application.
> >> Tomcat listens per default on all ports, so no special configuration
> >> needed (only if you host multiple domains on that server).
> >>
> >



-- 
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org

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


Re: Publishing Tomcat webapp

Posted by Jasmin Ćatić <ja...@gmail.com>.
Now I have another setback.
I have my tomcat running on the domain name www.mydomain.com and I have an
SSL certificate on this domain (CA_BUNDLE, Certificate and Key) in my
CPanel.
How to configure Tomcat to use this SSL and HTTPS protocol.

Thanks again for your help

pon, 18. srp 2022. u 08:24 Jasmin Ćatić <ja...@gmail.com> napisao
je:

> Thank you very much. I have done it successfully.
> Best regards
> JC
>
> ned, 17. srp 2022. u 09:08 Thomas Hoffmann (Speed4Trade GmbH)
> <Th...@speed4trade.com.invalid> napisao je:
>
>> Hello,
>>
>> > -----Ursprüngliche Nachricht-----
>> > Von: Aryeh Friedman <ar...@gmail.com>
>> > Gesendet: Sonntag, 17. Juli 2022 08:43
>> > An: Tomcat Users List <us...@tomcat.apache.org>
>> > Betreff: Re: Publishing Tomcat webapp
>> >
>> > On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
>> > <ar...@gmail.com>
>> > wrote:
>> > > Once you have it pointing to that domain just upload the war file to
>> > > it
>> > and give people the link.
>> >
>> > Small wording correction... I mean upload the war file as being a part
>> of the
>> > webapp and/or a part of an other webapp you have for downloading...
>> > take a look at the download section of the site I list in my signature.
>> >
>> > --
>> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
>>
>> Usually you need 2 things:
>> 1) A webserver or webspace. This includes a public IP address
>> 2) A domain. You can buy it online.
>>
>> When you own a domain, you have access to the DNS settings. Create an
>> A-Record with the domain-name and point it to the IP address of your server.
>> If an A-records already exists, modify it to point to the IP address of
>> the server.
>>
>> Install tomcat on the webserver and install your web-application.
>> Tomcat listens per default on all ports, so no special configuration
>> needed (only if you host multiple domains on that server).
>>
>

Re: Publishing Tomcat webapp

Posted by Jasmin Ćatić <ja...@gmail.com>.
Thank you very much. I have done it successfully.
Best regards
JC

ned, 17. srp 2022. u 09:08 Thomas Hoffmann (Speed4Trade GmbH)
<Th...@speed4trade.com.invalid> napisao je:

> Hello,
>
> > -----Ursprüngliche Nachricht-----
> > Von: Aryeh Friedman <ar...@gmail.com>
> > Gesendet: Sonntag, 17. Juli 2022 08:43
> > An: Tomcat Users List <us...@tomcat.apache.org>
> > Betreff: Re: Publishing Tomcat webapp
> >
> > On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
> > <ar...@gmail.com>
> > wrote:
> > > Once you have it pointing to that domain just upload the war file to
> > > it
> > and give people the link.
> >
> > Small wording correction... I mean upload the war file as being a part
> of the
> > webapp and/or a part of an other webapp you have for downloading...
> > take a look at the download section of the site I list in my signature.
> >
> > --
> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
>
> Usually you need 2 things:
> 1) A webserver or webspace. This includes a public IP address
> 2) A domain. You can buy it online.
>
> When you own a domain, you have access to the DNS settings. Create an
> A-Record with the domain-name and point it to the IP address of your server.
> If an A-records already exists, modify it to point to the IP address of
> the server.
>
> Install tomcat on the webserver and install your web-application.
> Tomcat listens per default on all ports, so no special configuration
> needed (only if you host multiple domains on that server).
>

AW: Publishing Tomcat webapp

Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
Hello,

> -----Ursprüngliche Nachricht-----
> Von: Aryeh Friedman <ar...@gmail.com>
> Gesendet: Sonntag, 17. Juli 2022 08:43
> An: Tomcat Users List <us...@tomcat.apache.org>
> Betreff: Re: Publishing Tomcat webapp
> 
> On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman
> <ar...@gmail.com>
> wrote:
> > Once you have it pointing to that domain just upload the war file to
> > it
> and give people the link.
> 
> Small wording correction... I mean upload the war file as being a part of the
> webapp and/or a part of an other webapp you have for downloading...
> take a look at the download section of the site I list in my signature.
> 
> --
> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org

Usually you need 2 things:
1) A webserver or webspace. This includes a public IP address
2) A domain. You can buy it online.

When you own a domain, you have access to the DNS settings. Create an A-Record with the domain-name and point it to the IP address of your server.
If an A-records already exists, modify it to point to the IP address of the server.

Install tomcat on the webserver and install your web-application.
Tomcat listens per default on all ports, so no special configuration needed (only if you host multiple domains on that server).

Re: Publishing Tomcat webapp

Posted by Aryeh Friedman <ar...@gmail.com>.
On Sun, Jul 17, 2022 at 2:39 AM Aryeh Friedman <ar...@gmail.com>
wrote:
> Once you have it pointing to that domain just upload the war file to it
and give people the link.

Small wording correction... I mean upload the war file as being a part of
the webapp and/or a part of an other webapp you have for downloading...
take a look at the download section of the site I list in my signature.

-- 
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org

Re: Publishing Tomcat webapp

Posted by Aryeh Friedman <ar...@gmail.com>.
If you need www.xxx.com to point to it you either need a machine that has
that name or access to the tomcat config and add that name to it and point
it to the right place.

For example:

In server.xml do something like this:

<Host name="www.xxx.com"  appBase="webapps" unpackWARs="true"
autoDeploy="true">
                        <Context path="" docBase="xxx" debug="0"
reloadable="true"/>
                </Host>

Once you have it pointing to that domain just upload the war file to it and
give people the link.

If you mean you want to make it so people can download it via some well
known/trusted open-source project site like githup or sourceforge you will
need to contact the site about how to set stuff up there.

On Sun, Jul 17, 2022 at 1:58 AM Jasmin Ćatić <ja...@gmail.com>
wrote:

> Okay, I understand this part and I have done this already.
> My question was how to publish on the internet, to be accessed by everyone
> via certain domain name
> (for example https://mydomain.com/webapp)
>
> ned, 17. srp 2022. u 03:44 Aryeh Friedman <ar...@gmail.com>
> napisao je:
>
> > The standard way I use for doing this is the following:
> >
> > 1. Create a .war of the app
> > 2. Copy it to the right machine and place it in the webapps dir (on Unix
> > likely something like /usr/local/apache-tomcat-9.0/webapps)
> > 3. The tomcat on the remote machine (by default config but this can be
> > changed) will automatically unpack and put it in the right place (i.e. if
> > your war file is X.war then the webapp will be called X)
> >
> > There are a few gotcha's here though:
> >
> > 1. The remote tomcat needs to be configured for auto deploy (this the
> > default)
> > 2. Your app needs to be truely portable (not dependant on anything
> outside
> > of it, it's .class and .jar files is needed and if you do have any such
> > dependencies the web app can automatically create them through whatever
> > init code you have
> >
> > I add one more thing to the above steps and it works out 99% of the
> time...
> > You might need to create what I call a "config mode" which contains
> > anything that is unique to a given machine and/or mode of operation...
> for
> > example in my main webapp I have Config.MODE=Config.MODE.DEV for
> > development and Config.MOD=Config.MODE.LIVE for production.... The main
> > differences is DEV attempts to minimize the use of external API's and
> often
> > fakes them LIVE does not and where the respective DB's live.
> >
> > On Sat, Jul 16, 2022 at 6:51 PM Jasmin Ćatić <ja...@gmail.com>
> > wrote:
> >
> > > I access it on localhost, or in my local network via local ip address
> and
> > > allocated port.
> > > For example:
> > > localhost:8080/webapp
> > >
> > > ned, 17. srp 2022. u 00:18 Rob Sargent <rs...@xmission.com> napisao
> > je:
> > >
> > > >
> > > >
> > > > On 7/16/22 16:14, Amn wrote:
> > > > > You read my mind! I was going to ask this very question, if not
> > > > > today... tomorrow.
> > > > > I am looking forward to see the replies to this question.
> > > > >
> > > > > On 2022-07-15 5:22 a.m., Jasmin Ćatić wrote:
> > > > >> Hello,
> > > > >>
> > > > >> Can someone please give me a step by step guide on how to make my
> > > tomcat
> > > > >> webapp available online with a domain name.
> > > > >> Thanks.
> > > > >>
> > > > >> Regards,
> > > > >> JC
> > > > >>
> > > > How do you (both) access your "webapp" today?
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail: users-help@tomcat.apache.org
> > > >
> > > >
> > >
> >
> >
> > --
> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> >
>


-- 
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org

Re: Publishing Tomcat webapp

Posted by Jasmin Ćatić <ja...@gmail.com>.
Okay, I understand this part and I have done this already.
My question was how to publish on the internet, to be accessed by everyone
via certain domain name
(for example https://mydomain.com/webapp)

ned, 17. srp 2022. u 03:44 Aryeh Friedman <ar...@gmail.com>
napisao je:

> The standard way I use for doing this is the following:
>
> 1. Create a .war of the app
> 2. Copy it to the right machine and place it in the webapps dir (on Unix
> likely something like /usr/local/apache-tomcat-9.0/webapps)
> 3. The tomcat on the remote machine (by default config but this can be
> changed) will automatically unpack and put it in the right place (i.e. if
> your war file is X.war then the webapp will be called X)
>
> There are a few gotcha's here though:
>
> 1. The remote tomcat needs to be configured for auto deploy (this the
> default)
> 2. Your app needs to be truely portable (not dependant on anything outside
> of it, it's .class and .jar files is needed and if you do have any such
> dependencies the web app can automatically create them through whatever
> init code you have
>
> I add one more thing to the above steps and it works out 99% of the time...
> You might need to create what I call a "config mode" which contains
> anything that is unique to a given machine and/or mode of operation... for
> example in my main webapp I have Config.MODE=Config.MODE.DEV for
> development and Config.MOD=Config.MODE.LIVE for production.... The main
> differences is DEV attempts to minimize the use of external API's and often
> fakes them LIVE does not and where the respective DB's live.
>
> On Sat, Jul 16, 2022 at 6:51 PM Jasmin Ćatić <ja...@gmail.com>
> wrote:
>
> > I access it on localhost, or in my local network via local ip address and
> > allocated port.
> > For example:
> > localhost:8080/webapp
> >
> > ned, 17. srp 2022. u 00:18 Rob Sargent <rs...@xmission.com> napisao
> je:
> >
> > >
> > >
> > > On 7/16/22 16:14, Amn wrote:
> > > > You read my mind! I was going to ask this very question, if not
> > > > today... tomorrow.
> > > > I am looking forward to see the replies to this question.
> > > >
> > > > On 2022-07-15 5:22 a.m., Jasmin Ćatić wrote:
> > > >> Hello,
> > > >>
> > > >> Can someone please give me a step by step guide on how to make my
> > tomcat
> > > >> webapp available online with a domain name.
> > > >> Thanks.
> > > >>
> > > >> Regards,
> > > >> JC
> > > >>
> > > How do you (both) access your "webapp" today?
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
>
>
> --
> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
>

Re: Publishing Tomcat webapp

Posted by Aryeh Friedman <ar...@gmail.com>.
The standard way I use for doing this is the following:

1. Create a .war of the app
2. Copy it to the right machine and place it in the webapps dir (on Unix
likely something like /usr/local/apache-tomcat-9.0/webapps)
3. The tomcat on the remote machine (by default config but this can be
changed) will automatically unpack and put it in the right place (i.e. if
your war file is X.war then the webapp will be called X)

There are a few gotcha's here though:

1. The remote tomcat needs to be configured for auto deploy (this the
default)
2. Your app needs to be truely portable (not dependant on anything outside
of it, it's .class and .jar files is needed and if you do have any such
dependencies the web app can automatically create them through whatever
init code you have

I add one more thing to the above steps and it works out 99% of the time...
You might need to create what I call a "config mode" which contains
anything that is unique to a given machine and/or mode of operation... for
example in my main webapp I have Config.MODE=Config.MODE.DEV for
development and Config.MOD=Config.MODE.LIVE for production.... The main
differences is DEV attempts to minimize the use of external API's and often
fakes them LIVE does not and where the respective DB's live.

On Sat, Jul 16, 2022 at 6:51 PM Jasmin Ćatić <ja...@gmail.com>
wrote:

> I access it on localhost, or in my local network via local ip address and
> allocated port.
> For example:
> localhost:8080/webapp
>
> ned, 17. srp 2022. u 00:18 Rob Sargent <rs...@xmission.com> napisao je:
>
> >
> >
> > On 7/16/22 16:14, Amn wrote:
> > > You read my mind! I was going to ask this very question, if not
> > > today... tomorrow.
> > > I am looking forward to see the replies to this question.
> > >
> > > On 2022-07-15 5:22 a.m., Jasmin Ćatić wrote:
> > >> Hello,
> > >>
> > >> Can someone please give me a step by step guide on how to make my
> tomcat
> > >> webapp available online with a domain name.
> > >> Thanks.
> > >>
> > >> Regards,
> > >> JC
> > >>
> > How do you (both) access your "webapp" today?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>


-- 
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org

Re: Publishing Tomcat webapp

Posted by Jasmin Ćatić <ja...@gmail.com>.
I access it on localhost, or in my local network via local ip address and
allocated port.
For example:
localhost:8080/webapp

ned, 17. srp 2022. u 00:18 Rob Sargent <rs...@xmission.com> napisao je:

>
>
> On 7/16/22 16:14, Amn wrote:
> > You read my mind! I was going to ask this very question, if not
> > today... tomorrow.
> > I am looking forward to see the replies to this question.
> >
> > On 2022-07-15 5:22 a.m., Jasmin Ćatić wrote:
> >> Hello,
> >>
> >> Can someone please give me a step by step guide on how to make my tomcat
> >> webapp available online with a domain name.
> >> Thanks.
> >>
> >> Regards,
> >> JC
> >>
> How do you (both) access your "webapp" today?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Publishing Tomcat webapp

Posted by Rob Sargent <rs...@xmission.com>.

On 7/16/22 16:14, Amn wrote:
> You read my mind! I was going to ask this very question, if not 
> today... tomorrow.
> I am looking forward to see the replies to this question.
>
> On 2022-07-15 5:22 a.m., Jasmin Ćatić wrote:
>> Hello,
>>
>> Can someone please give me a step by step guide on how to make my tomcat
>> webapp available online with a domain name.
>> Thanks.
>>
>> Regards,
>> JC
>>
How do you (both) access your "webapp" today?

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


Re: Publishing Tomcat webapp

Posted by Amn <am...@gmail.com>.
You read my mind! I was going to ask this very question, if not today... 
tomorrow.
I am looking forward to see the replies to this question.

On 2022-07-15 5:22 a.m., Jasmin Ćatić wrote:
> Hello,
>
> Can someone please give me a step by step guide on how to make my tomcat
> webapp available online with a domain name.
> Thanks.
>
> Regards,
> JC
>
-- 
*Using Fire Fox and Thunderbird.*
Developing for Android using Java, C/C++, HTM/CSS and SQLite as our 
platform has been exciting and most rewarding.
[ Ñ ]

-- 
This email has been checked for viruses by AVG.
https://www.avg.com