Sorry, for the late response. The premise is there are two sections to the site. There is the "static section" which lives at / and the dynamic section that lives at /foo (controlled by wicket). Normally you would just tell the container to mount the webapp to /foo and call it a day, but unfortunately there are two pages of .html that need to have some wicket and *logically* they belong in the root, not in foo. The rest of the root files are completely static and dished up directly by apache.

It's desirable to keep those two dynamic pages in / and thus have all their links relative to /. My friend thought (as did I) he could do that by mounting the wicket webapp to / and using WebApplication's mount() to mount the two root pages to /PageName.html, and the rest of the pages from the app to /foo/PageName.html. I know it looks like a bit of a screwed up situation, but it's a more of a logical thing for the designers (how the site is layed out logically). The two of the pages really do belong in /, the rest of the site under /foo.

To answer your question, when he uses wicket to mount foo/ HomePage.html, inside the page there is a link to <img src"images/ myimage.jpg"/> that gets rewritten to ../images/myimage.jpg, which is undesirable from his perspective.

Craig.

On 11-Nov-08, at 10:05 PM, Johan Compagner wrote:

I think that is what happens.
If pages are mounted we will fix the images so that they are not
screwed up because of the mount. What is ecactly in the html? I guess
../images/xxx right?

On 11/11/08, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
wicket should be rewriting static urls for you so it should work
transparently. what usecase exactly does not work?

-igor

On Mon, Nov 10, 2008 at 5:22 PM, Craig Tataryn <[EMAIL PROTECTED]> wrote:
If one were to mount a page like so:

mount(new
QueryStringUrlCodingStrategy("foo/HomePage.html",HomePage.class));

How would you go about having it so resources referenced in HomePage.html
are relative to foo/ and not /?  So if there was an <img
src="images/myimage.jpg" /> inside HomePage.html, currently the server
would
get a request for <context for webapp>/images/myimage.jpg, whereas the
goal
is to have it requested as <context of webapp>/foo/images/ myimage.jpg.

Thought <base href="foo/"/> would do the trick, but it didn't seem to.


Craig.

--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: [EMAIL PROTECTED], skype: craig.tataryn


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin
im: [EMAIL PROTECTED], skype: craig.tataryn


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to