/images will point to the server root localhost/images without the
contextRoot, i.e., it should be /contextRoot/images .. Now I must
manually update the contextRoot depending on where I deploy it.

**
Martin

2008/3/19, Matthew Young <[EMAIL PROTECTED]>:
> >background : url("images/bgimage.jpg");
>
>
> I think you need to put a "/" in front of "images" like:
>
>
>  background : url("/images/bgimage.jpg");
>
>
> On Wed, Mar 19, 2008 at 8:54 AM, Martin Makundi <
>
> [EMAIL PROTECTED]> wrote:
>
>  > Well.. my specific experience is from having
>  > <html>
>  > <head>
>  > <script type="css..">
>  > .body {
>  >  background : url("images/bgimage.jpg");
>  > }
>  > </script>
>  >
>  > I have had difficulties in getting he bg image to display properly if
>  > defined as above without proper context path, because it is different
>  > from the application itself. (the image is in webapp/images
>  > -directory).
>  >
>  > Also if I have <a href="MyBookmarkableWicketPage">Try this link</a>
>  > clicking the link takes me to /contextRoot/ without the
>  > appicationContext url segment (say,
>  > http://localhost/contextRoot/myApp/MyBookmarkableWicketPage where
>  > myApp is the missing applicationContext root).
>  >
>  > **
>  > Martin
>  >
>  > 2008/3/19, Martijn Dashorst <[EMAIL PROTECTED]>:
>  > > remove the /APPLICATION_CONTEXT/ from the src field. If they are in
>  > >  your HTML document when Wicket reads it into the cache, these
>  > >  attributes will be made context relative automatically.
>  > >
>  > >  Obviously this doesn't work for img tags that are inserted through a
>  > >  label, as Wicket doesn't know what you mean with the markup.
>  > >
>  > >  Martijn
>  > >
>  > >
>  > >  On 3/19/08, James Carman <[EMAIL PROTECTED]> wrote:
>  > >  > On 3/19/08, Martin Makundi <[EMAIL PROTECTED]>
>  > wrote:
>  > >  >  > I have a somewhat similar situation without a solution (yet).
>  > >  >  >
>  > >  >  >  I have some static resources (images and css files) on the
>  > server.
>  > >  >  >  Whenever I deploy the application, the URL of those resources
>  > depend
>  > >  >  >  on the environment as the application context root changes. What
>  > is
>  > >  >  >  the best/only way to tackle this?
>  > >  >  >
>  > >  >  >  <html>
>  > >  >  >  <body>
>  > >  >  >  static image:
>  > >  >  >  <img src="/APPLICATION_CONTEXT/images/static_image.jpg"/>
>  > >  >  >  </body>
>  > >  >  >  </html>
>  > >  >  >
>  > >  >
>  > >  >
>  > >  > Have you tried wrapping your <img> tags with  <wicket:link>?  When
>  > you
>  > >  >  do this, you can get your browser to display the image properly
>  > using
>  > >  >  relative URLs.  Beware, however, that the image URL must be relative
>  > >  >  to the current package of the page you're writing (at least until
>  > they
>  > >  >  apply my patch, hopefully).
>  > >  >
>  > >  > >
>  > >  >  >  Is the only solution to make it a wicket element? This slows down
>  > >  >  >  transferring a layout design into wicket significantly and seems
>  > like
>  > >  >  >  an overkill. Back in the old days I would just have a tag
>  > replacement:
>  > >  >  >
>  > >  >  >  <img src="<@APPLICATION_CONTEXT>/images/static_image.jpg"/>
>  > >  >  >
>  > >  >  >  What is the wicket-way to do this without requiring a wicket id
>  > and a
>  > >  >  >  hardcoded markup element for the Image in the Page java code.
>  > >  >  >
>  > >  >  >  **
>  > >  >  >  Martin
>  > >  >  >
>  > >  >  >
>  > >  >  >  2008/3/19, Erik van Oosten <[EMAIL PROTECTED]>:
>  > >  >  >
>  > >  >  > > You were on the right track, label is the right choice.
>  > >  >  >  >
>  > >  >  >  >  You need to provide Label a model that retrieves the string
>  > from your
>  > >  >  >  >  db. How you write that model is up to you. (I guess you
>  > already have
>  > >  >  >  >  this part.)
>  > >  >  >  >
>  > >  >  >  >  If you do not want the encoding, call
>  > setEscapeModelStrings(false) on
>  > >  >  >  >  the label.
>  > >  >  >  >
>  > >  >  >  >  Regards,
>  > >  >  >  >      Erik.
>  > >  >  >  >
>  > >  >  >  >
>  > >  >  >  >
>  > >  >  >  >  mmocnik wrote:
>  > >  >  >  >  > Hi,
>  > >  >  >  >  >
>  > >  >  >  >  > I'm currently searching for a way to insert an HTML String
>  > which I get out
>  > >  >  >  >  > of a DB into a Wicket Page.
>  > >  >  >  >  > The HTML string is from another application, so I can't
>  > change anything in
>  > >  >  >  >  > it.
>  > >  >  >  >  >
>  > >  >  >  >  > My first approach was to use a Label, but as Labels encode
>  > HTML entities,
>  > >  >  >  >  > this failed...
>  > >  >  >  >  > I just can't find any Component, that would fit here.
>  > >  >  >  >  >
>  > >  >  >  >  > Any sugestions on a component or alternate aproaches?
>  > >  >  >  >  >
>  > >  >  >  >  > Thanks and regards,
>  > >  >  >  >  > Marko
>  > >  >  >  >  >
>  > >  >  >  >
>  > >  >  >  >
>  > >  >  >  >  --
>  > >  >  >  >
>  > >  >  >  > Erik van Oosten
>  > >  >  >  >  http://www.day-to-day-stuff.blogspot.com/
>  > >  >  >  >
>  > >  >  >  >
>  > >  >  >  >
>  > >  >  >  >
>  >  ---------------------------------------------------------------------
>  > >  >  >  >  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]
>  > >  >
>  > >  >
>  > >
>  > >
>  > >
>  > > --
>  > >  Buy Wicket in Action: http://manning.com/dashorst
>  > >  Apache Wicket 1.3.2 is released
>  > >  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2
>  > >
>  > >
>  > >  ---------------------------------------------------------------------
>  > >  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]

Reply via email to