You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dean Hiller <de...@xsoftware.biz> on 2006/06/22 15:07:01 UTC

war filename in url. I want this to be different

I am trying to make a hosted service(with a few small apps) that companies
can purchase.  I want the default tomcat app(my app as I took default over)
to be run when a url like this is used

http://xsoftware.biz/<companyName>

and I want the req.war app to be run when this url is used

http://xsoftware.biz/<companyName>/req

I basically want to store the companyName in the request so the app knows
which company is being accessed, but want the correct web app to be executed
as well.  How can I do this?  Any good documentation on this?

I don't want a war file per companyName obviously, but it is like I want to
change out the default tomcat behavior where normally that would be mapped
to the war file name.  Is this even possible?

thanks,
dean

Re: war filename in url. I want this to be different

Posted by Dan Simmonds <da...@gmail.com>.
This should work (in server.xml):

 <Host name="xsoftware.biz" appBase="/webapps/companyName">

        <Context path="/req" docBase="warfilename.war" />
</Host>

assuming that /webapps/companyName/warfilename.war

is a valid filepath.

Dan

Dean Hiller wrote:
> I am trying to make a hosted service(with a few small apps) that 
> companies
> can purchase.  I want the default tomcat app(my app as I took default 
> over)
> to be run when a url like this is used
>
> http://xsoftware.biz/<companyName>
>
> and I want the req.war app to be run when this url is used
>
> http://xsoftware.biz/<companyName>/req
>
> I basically want to store the companyName in the request so the app knows
> which company is being accessed, but want the correct web app to be 
> executed
> as well.  How can I do this?  Any good documentation on this?
>
> I don't want a war file per companyName obviously, but it is like I 
> want to
> change out the default tomcat behavior where normally that would be 
> mapped
> to the war file name.  Is this even possible?
>
> thanks,
> dean
>

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