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ć <jasmin.cati...@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 <aryeh.fried...@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ć <jasmin.cati...@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 <rsarg...@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-unsubscr...@tomcat.apache.org
> > > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > > >
> > > >
> > >
> >
> >
> > --
> > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
> >
>


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

Reply via email to