Hello Martijn:

Thank you for your prompt reply.  This was exactly what I needed.  I did 
purchase your Wicket in Action book and I started reading it yesterday.  The 
book is great!  I also appreciate the high quality sample application, which 
will be very helpful as I begin to create my own applications.

Regards,

Joe Caristi

-----Original Message-----
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2008 9:54 AM
To: users@wicket.apache.org
Subject: Re: Newbie IMG question

it depends where you put the image. If you put it next to the html and
java file, you should surround the img tag with
<wicket:link></wicket:link> otherwise Wicket won't know that you want
Wicket to serve the image.

If you put it in the context root, then usually you don't have to do
anything (depending on your filter mapping). If you want to control
the image from Java code, but still put it in the context root, then
you should use the ContextImage component.

Martijn

On Fri, Nov 14, 2008 at 3:37 PM, jcaristi <[EMAIL PROTECTED]> wrote:
>
> I am using Wicket 1.4-rc1 (I also tried 1.3.5). I have a very simple
> application with a very simple IMG tag:
>
> img src="whi-06sliced_02.gif"
>
> In the browser, the image does not display and the page source looks like
> this:
>
> img src="../whi-06sliced_02.gif"
>
> From all of the documentation I've read, this does not seem to be the
> correct behavior.  I've tried locating the image everywhere I can think of,
> without success.  I think the image should be in the same folder (or a
> sub-folder) of the Java and HTML for the page.  Is this correct?  How do I
> get the relative path to be properly set?
>
> Here is my web.xml:
>
> <filter>
>        <filter-name>WicketFilter</filter-name>
>        
> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
>        <init-param>
>                <param-name>applicationClassName</param-name>
>                <param-value>com.whisolutions.pss.web.NexPartPS</param-value>
>        </init-param>
> </filter>
> <filter-mapping>
>        <filter-name>WicketFilter</filter-name>
>        <url-pattern>/admin/*</url-pattern>
> </filter-mapping>
>
> Here is the code:
>
> http://www.nabble.com/file/p20501647/ServerCode.java ServerCode.java
> http://www.nabble.com/file/p20501647/ServerCode.html ServerCode.html
> http://www.nabble.com/file/p20501647/NexPartPS.java NexPartPS.java
>
> I'm using Maven for the Wicket dependency:
>
> <dependency>
>        <groupId>org.apache.wicket</groupId>
>        <artifactId>wicket</artifactId>
>        <version>1.4-rc1</version>
> </dependency>
>
> --
> View this message in context: 
> http://www.nabble.com/Newbie-IMG-question-tp20501647p20501647.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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


STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at [EMAIL PROTECTED],
and destroy all copies of this message and any attachments.

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

Reply via email to