The value of the page attribute to html:img has to start with a "/". When you use the page attribute, the tag prepends the application context to the relative URL. So if you use html:img page="/frame/common/. . .", you should end up with img src="/HSInfo/frame/common/. . ." when you view source on the generated page. This is probably what you want, but there are still other things that could go wrong. For example, is your controller Servlet mapped to something like "/*"?

Erik

Caroline Jen wrote:

Thanks for your reply.

I followed your advices:

1. Try just:
frame/common/images/dhs-header-title.JPEG (with no
leading slash)

  does not work.

2. You are right.  The generated HTML is an <img
src="..." > tag.  When I clicked "View Source", it is:

<img
src="/HSInfo/frame/common/images/dhs-header-title.jpeg"
width="600" border="0" alt="[information]">


3. I copied the generated HTML tag (but changed 'img'
to 'html:img' and changed 'src' to 'page') to my
source code.

  does not work.

4. I am using the Windows XP.

5. I tried both .jpeg and .jpg

  does not work.

I do not know what to do now.  Please help more.
--- Wendy Smoak <[EMAIL PROTECTED]> wrote:



From: "Caroline Jen" <[EMAIL PROTECTED]>


<html:img



page="/HSInfo/frame/common/images/dhs-header-title.JPEG"


border="0" width="800" alt="[infomation]"/>
The image does not get picked up in the browser.
Therefore, only the text "information" is shown.


Have you tried it with a relative link?  Try just:
frame/common/images/dhs-header-title.JPEG (with no
leading slash).

It's best not to hard-code the name of the webapp
into anything if you can
avoid it... more to modify if you change it later,
or like me, run -dev
and -test versions with the same code under
different context names.

Shouldn't the generated HTML be an <img src="...">
tag??  You wrote that it
says 'page'.  Copy and paste the entire tag from the
HTML if it's still not
working.

If you're on UNIX, then it's case sensitive-- .JPEG
and .jpeg are not the
same.

Does your browser understand what to do with a .jpeg
file?  Try renaming it
.jpg and see what happens.

--
Wendy Smoak





---------------------------------------------------------------------


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








__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo


---------------------------------------------------------------------
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