struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict" <>
Subject Re: Make struts 1 skip outputting context path?
Date Mon, 17 Dec 2007 16:21:07 GMT
Can't this be solved with URL rewriting?

Configure Apache to send all requests from /* to /some-name/*

Will this work?


On Dec 17, 2007 10:09 AM, <> wrote:

> Hi,
> We have a webapplication using struts 1.2.9, and this webapp is under
> context /some-name in tomcat. However in front of tomcat we have
> apache, and it mapps the domain name to /some-name. This
> works great, except when it comes to struts. Since struts notice that
> the webapp has the context some-name, it insists on outputting that
> context path to all url's (like actions for struts forms). So if we
> have an action path "/forum/posting/post" defined, struts outputs the
> action url as ""
> and that doesn't work.
> Is there any way we can configure struts so it doesn't output the
> context path 'some-name' in these urls?
> We can't use the context ROOT in tomcat, since we will later have
> multiple websites in the same tomcat (they will all be a part of the
> same CMS, and they must run in the same tomcat).
> I tried changing the action path to use wildcards, like
> path="**/forum/posting/post", but then it complains that it cant find
> "/forum/posting/post".
> Any ideas? There must have been other people with this very same
> problem...
> Regards
> /Jimi
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message