struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From str...@hullegard.com
Subject Make struts 1 skip outputting context path?
Date Mon, 17 Dec 2007 16:09:27 GMT
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 some-name.com 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 "http://some-name.com/some-name/forum/posting/post.do"  
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message