tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Евгений Кузнецов <eugeny.kuznet...@gmail.com>
Subject Re: Try to deploy war and keep access to my webapp in browser without entering context root name
Date Thu, 21 May 2015 16:37:16 GMT
Yes it is. Cross-posting.
I thought my question on stackoverflow is not pupular or sugnificant. 
And there are not many people interesting in it.
So I tried to ask here.

On 21.05.2015 19:32, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Евгений,
>
> On 5/21/15 11:56 AM, Евгений Кузнецов wrote:
>> I asked question in stakoverflow
>> http://stackoverflow.com/questions/30304478/tomcat-deploying-a-webapp-
> which-is-accessed-via-browser-without-context-root-na
>
> Cross-posting?
> :(
>
>> 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>
> Don't put your <Context> element in server.xml. Put it into your WAR
> file in META-INF/context.xml.
>
>> 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?
> As others have said, re-name the directory from mywebapp to ROOT (case
> matters).
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJVXgiuAAoJEBzwKT+lPKRYpZEQAJ0z+/TepxE/EqpI8SnNE4lz
> Vjho7G0jhyJafjKQ/uaRx6kFyX1BtcRvymlyAyes8iBK455acisXV939YmuAlCBX
> S3X6yAeIOxNq1xMsLq8F4oJQkq2OBdhC9/ozoByBaIEk38n1pvlWVoIWKl/hLedb
> GM4w793z/fgrzNYglN8Evsr3waxI3PSrUWOonRhpTMUHYXdlSZw2AYSUVsANPwzS
> +FeSZTUL9x/M0NzBH/J1WAlw7MHusoVsIAfMuUm+tCOrdn/YGunb+hVHXz6lzVar
> l8lll7FpxKAFLG+FmpBo5cRp2cbd28I0RXLnpEfWGd3z+v0cHpC4igoeTF+A7V8O
> 6S046Fxe02xlph/wlCFQ80VTGoJLtJFUR7yPrqI7T22qxi2b4iV+9Vr9dRbRg5kt
> WmaawoUNe5yd3hQjxkbvTW+oh/+Al4vcYM+cFRaQo8NZsCAfU1nRTNxem16q9Yun
> nLWkKx0H4uxCWRAaRbnr2ytrlODWP//XIzXCLaiZ4PZ7yUBLDxz00fFqMJ5v/Buv
> snwLYsPtsYQks4iq/jtCzxk7HqMdEkVeHrDAZQXGuZ4NkpfJmc/3qPTQvZpWxDK9
> DEV3vL2niUhZsgOp3hensOX3dRaxc/60Eq/4VCdYZVLJArIFDVVE2qgnhO36ObVU
> n6O3DweS1xOtaZdng9NM
> =H6Nb
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message