You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Daniel Jue <te...@gmail.com> on 2007/08/23 20:30:47 UTC

[General] Changing the name of web app

I am attempting to do this, but I am not getting the results I was wanting.


lets say I have an application called MyApp2, which I can access as
www.mycomp.com/MyApp2

(Now of course lots of things have this name in it, like the packages,
some hard coded paths in Javascript, etc)

And lets say a pointy haired boss decided that the url should now be
www.mycomp.com/MyApp

Arg!

I thought I'd only have to change the in one spot in the Web.xml, but
it seems like that is just a name (I changed it to MyApp anyway)  I
tried changing the context root to MyApp (Through Eclipse), and now I
can access it through both of the above urls!

As shown in the Tomcat Launcher in Eclipse
Before:
Path = /MyApp2
DocumentBase = MyApp2
Module = MyApp2

Currently:
Path = /MyApp
DocumentBase = MyApp2
Module = MyApp2

This is very strange to me!
I even made sure to stop the server, remove the module, and manually
delete the MyApp2 directories under Tomcat (under work and webapps).
I also cleaned and recompiled.

I now get MyApp and MyApp2 under the work directory (which saves caches i think)
and only MyApp2 under the webapps directory.

Any pointers?

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


RE: [General] Changing the name of web app

Posted by Jonathan Barker <jo...@gmail.com>.
Daniel,

Recognize that your servlet container will have its own, sometimes
confusing, way of specifying contexts.

With tomcat, I think it defaults to the name of the war file, overriding
whatever you have in web.xml.  

Once you layer on Eclipse integration - who knows what they override?  I'm
just grateful for the integrations.

I've given up over-thinking it, and my development environment (using
JettyLauncher in Eclipse) shows up one way, and my production environment
(usually JBoss using tomcat, but sometimes pure tomcat) shows up another.

I don't use absolute paths anywhere. I have burned large amounts of time
figuring out how to do it the "tapestry way" for javascript in the past, but
it's worth it for situations like this.

In the end, it all works and shows up where it should.

Jonathan


> -----Original Message-----
> From: Daniel Jue [mailto:teamphy6@gmail.com]
> Sent: Thursday, August 23, 2007 2:31 PM
> To: Tapestry users
> Subject: [General] Changing the name of web app
> 
> I am attempting to do this, but I am not getting the results I was
> wanting.
> 
> 
> lets say I have an application called MyApp2, which I can access as
> www.mycomp.com/MyApp2
> 
> (Now of course lots of things have this name in it, like the packages,
> some hard coded paths in Javascript, etc)
> 
> And lets say a pointy haired boss decided that the url should now be
> www.mycomp.com/MyApp
> 
> Arg!
> 
> I thought I'd only have to change the in one spot in the Web.xml, but
> it seems like that is just a name (I changed it to MyApp anyway)  I
> tried changing the context root to MyApp (Through Eclipse), and now I
> can access it through both of the above urls!
> 
> As shown in the Tomcat Launcher in Eclipse
> Before:
> Path = /MyApp2
> DocumentBase = MyApp2
> Module = MyApp2
> 
> Currently:
> Path = /MyApp
> DocumentBase = MyApp2
> Module = MyApp2
> 
> This is very strange to me!
> I even made sure to stop the server, remove the module, and manually
> delete the MyApp2 directories under Tomcat (under work and webapps).
> I also cleaned and recompiled.
> 
> I now get MyApp and MyApp2 under the work directory (which saves caches i
> think)
> and only MyApp2 under the webapps directory.
> 
> Any pointers?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


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