On Thu, May 21, 2015 at 12:03 PM, Mark Eggers <its_toas...@yahoo.com.invalid
> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 5/21/2015 8:56 AM, Евгений Кузнецов wrote:
> > Hello,
> >
> > I asked question in stakoverflow
> > http://stackoverflow.com/questions/30304478/tomcat-deploying-a-webapp-
> which-is-accessed-via-browser-without-context-root-na
> >
> >
> >
> >
> > I ll repeat it here:
> >
> > I have a webapp (spring mvc 4 application) which code is placed in
> >  |tomcat-7/webapp/mywebapp/| folder. Webapp is accessed in browser
> > with url |http://my-web-app.loc:8080| (i.e. without context root
> > name |mywebapp| after port number). I have following setups in
> > |tomcat-7/conf/server.xml|:
> >
> > |<Host name="my-web-app.loc" appBase="webapps" unpackWARs="true"
> > autoDeploy="true"> <Context path="" docBase="mywebapp"
> > reloadable="true" allowLinking="true" antiJARLocking="true"
> > copyXML="true" /> <Valve
> > className="org.apache.catalina.valves.AccessLogValve"
> > directory="logs" prefix="mywebapp.access." suffix=".log"
> > pattern="common" resolveHosts="true" /> </Host> |
> >
> > I delploy webapp by placing war-file into |/webapp| folder. But
> > after war-file is unpacked and webapp is successfully deployed, I
> > can access to webapp only with
> > |http://my-web-app.loc:8080/mywebapp| url. Url
> > |http://my-web-app.loc:8080| directs me to 404 tomcat error page.
> >
> > What I have to setup to access to webapp with
> > |http://my-web-app.loc:8080| url?
> >
>
> Rename mywebapp.war to ROOT.war (case is important) and deploy.
>
> . . . just my two cents
> /mde/
>

+1 - That will be the easiest solution and then you can probably remove the
<Context/> tag from your server.xml, which is something that's frowned upon.

Dan



> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBAgAGBQJVXgG0AAoJEEFGbsYNeTwtkIoH/ixe/TEPmdDSwyfnGoivBjbP
> BE1/p095dcm2K/sEn9FfxddgC7a2gIYa+2Nlu4IHrMoBk+hKH4FLfN5cQid7ZbIk
> 2PUwbxnC/tWULIJ8AWgLE8x6aIyHgNMeuSjZCMcKV90FNANhouDsh0XAg6Fod+Ky
> CELckKpJKCGaAvfc/o8NNR2atJDrXdOUl1ApTgJ21RDcipBCp5dPQGCL3qZljjS5
> tJtsXz3+fIutS8D+5walqG/mjUtLXDuWp5nCCOsq2uYGiCaIH6ISwdlAZpOm2kzN
> fbTpmm4wjwn3GKYx6bNlLL624nd/ac6e6JHaUVcpDah4iQqfHJzSL3dTB1+7Vyw=
> =jkyz
> -----END PGP SIGNATURE-----
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to