Ok, I think may see the start of my problem. I have been unable to setup a WicketFilter with JkMount /myapp* . I have only been able to successfully use the WicketWilter if my JkMount is "JkMount /* default" for example. I have been trying exactly what you mention below but to no success (sorry for the confusion):
-- Run a Wicket webapp on http://appserver.com:8080/ -- (Note that's a root context path.) -- - Map Wicket to the root using servlet mapping/filter mapping of "/*". -- - Pass requests from an Apache which land on www.mydomain.com through -- to the Apache, unless they land on /myapp/*, in which case send them -- to Wicket. Here is my filter: <filter> <filter-name>MyWebsite</filter-name> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class> <init-param> <param-name>applicationClassName</param-name> <param-value>com.mywebsite.MyApplication</param-value> </init-param> <init-param> <param-name>filterMappingUrlPattern</param-name> <param-value>/*</param-value> </init-param> </filter> <filter-mapping> <filter-name>MyWebsite</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Here is JkMount: <IfModule mod_jk.c> JkMount /myapp* default JkMount /myapp/* default JkUnMount /images default JkUnMount </IfModule> If i could get this to work, I bet all of my hard to explain issues go away. Those JkMounts above result in 404 errors. I have no mod_rewrites of any sort that would be interfering. If I do this though, it works <IfModule mod_jk.c> JkMount /* default JkUnMount /images </IfModule> I have no mod_rewrites or anything that would conflict. I am viewing the source of the WicketFilter and see the filterMappingUrlPattern which i why I included it web.xml init params, although it is not mentioned on the migration docs: http://cwiki.apache.org/WICKET/migrate-13.html#Migrate-1.3-FilterinsteadofaServlet . So, rather than confuse you any more, is it obvious from the the above why the Filter only works when I JkMount /* default ? If I could get it to JkMount /myapp* default, all of my relative path issues would most likely go away according to what you have explained. Thanks again Al Maw wrote: > > Chris Lintz wrote: >> Thanks for the response. Yes I am using Wicket 1.3 Beta 2. I First >> mapped >> the WAR at root, and let everything fall through Apache with JkUnMounts >> (i.e. JkUnMount /images default), but the issue is I could not solve the >> problem of I did not want / served by wicket. >> >> Basically it comes down to this. I cannot seem to make a reference to >> Wicket page on a path www.mydomain.com/myapp from my static home page >> www.mydomain.com because the relative path is "/" . I need the Wicket >> components to render under /myapp even from requests coming from / . > > OK. I'm slightly confused at the moment, because you haven't quite > specified well enough how you're trying to achieve this. Please could > you clarify the following points: > > - What context path is your app running in? Is it the root? > - Is Wicket running using a filter or a servlet? > - Is Wicket mapped to "/myapp/*" in web.xml? > - What is your mod_jk forwarding set-up, exactly? > - You say you're forwarding from www.mydomain.com to > www.mydomain.com/myapp, but obviously you're not quite, > as otherwise you'd just get an infinite loop there. ;) > - Specifically, where are your wildcards if there are any? > > You seem to be concentrate too much on the specifics of what's wrong > with your set-up, rather than what you're trying to achieve here. > > As far as I can tell, you want to do the following: > - Run a Wicket webapp on http://appserver.com:8080/ > (Note that's a root context path.) > - Map Wicket to the root using servlet mapping/filter mapping of "/*". > - Pass requests from an Apache which land on www.mydomain.com through > to the Apache, unless they land on /myapp/*, in which case send them > to Wicket. > - You don't want your static resources served from within Tomcat. > > Is that right? > > Even if that's so, I still don't understand what specific issue you're > having. Actually giving us some URLs might be illustrative here. > > If you get a request for this: > - www.myserver.com/myapp/path/to/mounted/page/ > > Assuming your context path is "/", that will get mapped to: > - appserver.com:8080/path/to/mounted/page/ > > If you add a HeaderContributor with a ResourceReferences, or something > similar, Wicket will give you URLs relative to that, so something like > this in your generated HTML: > - href="../../../../resources/com.company.HomePage/foo.css" > > This will resolve to the following in your browser: > - www.myserver.com/myapp/resources/com.company.HomePage/foo.css > > ...which is perfectly correct, as obviously Wicket needs to handle that. > > So what exactly is going wrong for you here? > > You say: > >>>> The problem is everything wicket related is written from the >>>> relative path (i.e. "/" ) not with the /myapp prefixed in front. >>>> Therefore, the component, Wicket Javascript references, etc are >>>> broke because of the relative path. > > Broken how? Give us some specifics. This stuff should work just fine. > You may be having issues with 302 redirects going to the wrong place, or > cookie paths, but it doesn't sound like it. See the wiki page on > mod_proxy for details. > > Sorry, but better and less ambiguous question asking is required here... > > Regards, > > Al > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/A-Relative-path-question-tf4303862.html#a12262906 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]