The problem with the extra dot-dot in the image src that arises when the
filter is map to /* seems to be fixed when I do this:
mountBookmarkablePage("/home", HomePage.class);

Now, the URL I see in the browser when I access the homepage is this:
http://server/context-path/home
instead of http://server/context-path/

that makes the extra dot-dot in the images src acceptable.

----

To reproduce the problem,
1. map the filter to /*
2. have an unmounted page (page not mounted to a path).
3. Access the the page. The src paths in the images will be problematic
because of the extra dot-dot (..)

On 26/10/2007, Otan <[EMAIL PROTECTED]> wrote:
>
> And another thing, the problem occurs only on the homepage.
>
> On 26/10/2007, Otan <[EMAIL PROTECTED]> wrote:
> >
> > When mapped with /*
> > the URL of the homepage that I see in my browser is
> > http://server/context_path/
> >
> > But a generated image path, which is wrong, looks like this:
> > ../images/mainmenu- home.jpg which translates to
> > http://server/images/mainmenu-home.jpg
> >
> > The correct path of the image src should be images/mainmenu- 
> > home.jpg(without the extra dot-dot ..) which is equivalent to
> > http://server/context_path/images/mainmenu-home.jpg
> >
> > But as I've said, the problem only occurs when the filter map is /* but
> > everything works fine when the filter is map to /app/*
> >
> > On 26/10/2007, Al Maw < [EMAIL PROTECTED]> wrote:
> > >
> > > This should work just fine.
> > >
> > > What's the URL in your browser's address bar?
> > >
> > > Wicket will automatically prepend things to make paths relative to the
> > > context root.
> > >
> > > Regards,
> > >
> > > Al
> > >
> > > Johan Compagner wrote:
> > > > filter should be mapped on /* thats why we have the filter.
> > > > I don't know why the ../ is generated what is the url that you see
> > > in the
> > > > browser?
> > > > Maybe AlMaw can pitch in a bit.
> > > >
> > > > johan
> > > >
> > > >
> > > >
> > > > On 10/18/07, Otan <[EMAIL PROTECTED]> wrote:
> > > >> I'm using wicket beta 4 release.
> > > >>
> > > >> Images source path is wrong when my wicket filter is mapped to the
> > > url /*
> > > >> The reason is because the src path of each images changes into
> > > something
> > > >> with double dot (..)
> > > >>
> > > >> Example:
> > > >> my wicket filter:
> > > >>    <filter>
> > > >>        <description> </description>
> > > >>        <filter-name>Wicket</filter-name>
> > > >>        <filter-class>org.apache.wicket.protocol.http.WicketFilter
> > > >> </filter-class>
> > > >>        <init-param>
> > > >>            <param-name>applicationClassName</param-name>
> > > >>            <param-value>fackage.MyApplication</param-value>
> > > >>        </init-param>
> > > >>    </filter>
> > > >>    <filter-mapping>
> > > >>        <filter-name>Wicket</filter-name>
> > > >>        <url-pattern>/*</url-pattern>
> > > >>    </filter-mapping>
> > > >>
> > > >> the html...
> > > >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> > > >> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
> > > >> <html xmlns="http://www.w3.org/1999/xhtml"; xmlns:wicket="
> > > >> http://wicket.apache.org ">
> > > >>    <head>
> > > >>        <title>~</title>
> > > >>    </head>
> > > >>    <body>
> > > >>        <div>
> > > >>            <img src="images/kulafu.jpg" alt="" />
> > > >>        </div>
> > > >>    </body>
> > > >> </html>
> > > >>
> > > >>
> > > >> then the img tag in the html becomes...
> > > >> <img alt="" src="../images/kulafu.jpg"/>
> > > >>
> > > >> the rendered src path is wrong because of the extra dot-dot-slash.
> > > But
> > > >> it's
> > > >> correct if the wicket filter is mapped with /something/*
> > > >>
> > > >> If it's not a bug, am I discouraged to map my filter using /* ?
> > > >>
> > > >
> > > >
> > > > !DSPAM:471a337530941545816891!
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>

Reply via email to