users@glassfish.java.net

Cannot display image from form-based login jsp

From: <glassfish_at_javadesktop.org>
Date: Wed, 05 Aug 2009 13:04:11 PDT

Hi, Dear:

Would you please advise me how to display an image from form-based login jsp?

I coded a form-based login jsp and it works fine and allow me to login (I already did all setups). However the login jsp cannot display the image which I put in the jsp.


The login jsp is coded like following:

<!--
<table width="100%" cellpadding="0" cellspacing="0" border="0" id="appBanner">
<tr>
  <td width="140"><img src="/images/eah_banner_logo.gif" height="83" width="90" border="0"></td>
  <td id="banner" width="610"><img src="/images/eah_banner_head.gif" height="83" width="602"></td>
<td id="fill2" width="100%">&nbsp;</td>
</tr>
</table>
<form method="post" action="j_security_check" name="loginForm">
<table width="618" border="0" align="center" height="146">
<tr>
<td height="23" valign="bottom" class="mainBodyHeader" width="372">Logon</td>
</tr>
<tr>
<td width="40%" class="generalText">User ID:</td>
<td width="60%" align="left">
<input name="j_username" type="text" size="13" maxlength="13" class="generalText">
</td>
</tr>
<tr>
<td class="generalText">Password:</td>
<td align="left">
<input name="j_password" type="password" size="13" maxlength="13" class="generalText">
<input name="Button" type="submit" class="buttonText" value="OK">
<input name="cancel" type="button" class="buttonText" onClick="self.close();" value="Cancel">
</td>
</tr>
</table>
</form>
-->

---------------------------------------------
The file structure is like this:
AISWeb\WebContent\login.jsp
AISWeb\WebContent\images
--------------------------------------------

When the .ear file is deployed on GlassFish, the files are deployed as following:

C:\Sun\SDK\domains\domain1\applications\j2ee-apps\AIS\AISWeb_war\login.jsp

C:\Sun\SDK\domains\domain1\applications\j2ee-apps\AIS\AISWeb_war\images

I am guessing that the login jsp cannot find the directory of images.


Even I changed as

<!--
<img src="/AISWeb/images/eah_banner_logo.gif" height="83" width="90" border="0">
-->

it still does not work and cannot display the image.

Does anyone have any idea or experience o that? Please help me on that.

Thank you very much.

Henry
[Message sent by forum member 'henryliu' (henryliu)]

http://forums.java.net/jive/thread.jspa?messageID=359055