You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Neil B. Cohen" <nc...@verisign.com> on 2007/10/01 17:33:54 UTC
Can't locate an image file...
I am experimenting with the simplest of the Wicket examples. I was
trying to add an image to the SignIn
example page. My html code looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:wicket="http://wicket.apache.org/"><head><title>Wicket
Examples - si
gnin</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body style="color: rgb(0, 0, 0); background-color: silver;"
alink="#000099" lin
k="#000099" vlink="#990099">
<br>
<span wicket:id="feedback"> <br>
</span>
<br>
<img style="width: 96px; height: 42px;" alt="" src="My_logo.gif">
< <<**** New image added...
big><big><span style="font-weight: bold; font-style: italic;">Program
Title...</
span></big></big><br>
<br>
<form wicket:id="signInForm">
<table>
..... rest of the signin.html code is unchanged...
When I load the war file, the image does not show - there is a box where
it should be, followed by the
'Program Title' text. I put the My_logo.gif file in the same directory
as the SignIn.java/SignIn.html files.
Questions:
1) Do I need to put something in the SignIn.java file to tell it to load
the image?
2) Do I need to add something to a config file somewhere to tell it
where to locate the image file? Do the image files have to be in the
same src directory as the html/java files or can they be moved somewhere
else (like src/images for example)?
Thanks very much,
nbc
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Can't locate an image file...
Posted by "Neil B. Cohen" <nc...@verisign.com>.
Martijn Dashorst wrote:
> You need to tell wicket to search for the image. So you have to either:
>
> 1. add an Image component to the signin page/panel
> 2. surround (at least) the img tag with <wicket:link></wicket:link>
>
> Otherwise WIcket will not know that it should look for the image on
> the classpath.
>
>
Got it - I added an Image component in the java file and that worked.
Thanks!
nbc
> Martijn
>
> On 10/1/07, Neil B. Cohen <nc...@verisign.com> wrote:
>
>> I am experimenting with the simplest of the Wicket examples. I was
>> trying to add an image to the SignIn
>> example page. My html code looks like this:
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>> <html xmlns:wicket="http://wicket.apache.org/"><head><title>Wicket
>> Examples - si
>> gnin</title>
>>
>> <link rel="stylesheet" type="text/css" href="style.css">
>> </head>
>> <body style="color: rgb(0, 0, 0); background-color: silver;"
>> alink="#000099" lin
>> k="#000099" vlink="#990099">
>> <br>
>> <span wicket:id="feedback"> <br>
>> </span>
>> <br>
>> <img style="width: 96px; height: 42px;" alt="" src="My_logo.gif">
>> < <<**** New image added...
>> big><big><span style="font-weight: bold; font-style: italic;">Program
>> Title...</
>> span></big></big><br>
>> <br>
>> <form wicket:id="signInForm">
>> <table>
>> ..... rest of the signin.html code is unchanged...
>>
>> When I load the war file, the image does not show - there is a box where
>> it should be, followed by the
>> 'Program Title' text. I put the My_logo.gif file in the same directory
>> as the SignIn.java/SignIn.html files.
>>
>> Questions:
>> 1) Do I need to put something in the SignIn.java file to tell it to load
>> the image?
>>
>> 2) Do I need to add something to a config file somewhere to tell it
>> where to locate the image file? Do the image files have to be in the
>> same src directory as the html/java files or can they be moved somewhere
>> else (like src/images for example)?
>>
>> Thanks very much,
>>
>> nbc
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Can't locate an image file...
Posted by Martijn Dashorst <ma...@gmail.com>.
You need to tell wicket to search for the image. So you have to either:
1. add an Image component to the signin page/panel
2. surround (at least) the img tag with <wicket:link></wicket:link>
Otherwise WIcket will not know that it should look for the image on
the classpath.
Martijn
On 10/1/07, Neil B. Cohen <nc...@verisign.com> wrote:
> I am experimenting with the simplest of the Wicket examples. I was
> trying to add an image to the SignIn
> example page. My html code looks like this:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html xmlns:wicket="http://wicket.apache.org/"><head><title>Wicket
> Examples - si
> gnin</title>
>
> <link rel="stylesheet" type="text/css" href="style.css">
> </head>
> <body style="color: rgb(0, 0, 0); background-color: silver;"
> alink="#000099" lin
> k="#000099" vlink="#990099">
> <br>
> <span wicket:id="feedback"> <br>
> </span>
> <br>
> <img style="width: 96px; height: 42px;" alt="" src="My_logo.gif">
> < <<**** New image added...
> big><big><span style="font-weight: bold; font-style: italic;">Program
> Title...</
> span></big></big><br>
> <br>
> <form wicket:id="signInForm">
> <table>
> ..... rest of the signin.html code is unchanged...
>
> When I load the war file, the image does not show - there is a box where
> it should be, followed by the
> 'Program Title' text. I put the My_logo.gif file in the same directory
> as the SignIn.java/SignIn.html files.
>
> Questions:
> 1) Do I need to put something in the SignIn.java file to tell it to load
> the image?
>
> 2) Do I need to add something to a config file somewhere to tell it
> where to locate the image file? Do the image files have to be in the
> same src directory as the html/java files or can they be moved somewhere
> else (like src/images for example)?
>
> Thanks very much,
>
> nbc
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org