You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/05/14 22:02:55 UTC

DO NOT REPLY [Bug 19928] New: - tag results in broken image for first request

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19928>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19928

<html:img page="..." /> tag results in broken image for first request

           Summary: <html:img page="..." /> tag results in broken image for
                    first request
           Product: Struts
           Version: 1.1 RC1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: schultz@adrenaline.com


I use <html:img page="/image.gif" /> in order to display images without having
to specify the context path.

The first time I hit my site, I don't have a session, and the container cannot
determine wether or not my browser will support or allow cookies, so it appends
the session id to the URL:

<img src="/[webapp]/image.gif;jsessionid=A42505830776C876949F3541D9A07073">

Using Apache Web Server, this URL results in a 404 Not Found response, thereby
breaking the image on the page. Pressing the refresh button confirms to the
container that cookies are being used, so the session id is not appended to the
image URL, and the image displays correctly.

I have tried to defeat this by adding a '?' to the end of my image URL:

<html:img page="/image.gif?" />

This unfortunately results in the following HTML code:

<img src="/[webapp]/image.gif;jsessionid=A42505830776C876949F3541D9A07073?">

(note the '?' after the sessionid)

Here are all of my relevant versions:
OS: Linux 2.4.18
JRE: 1.4.1_02-b06
Container: Tomcat 4.1.24
Struts: 1.1-rc1 (also fails in 1.0)

I'm not sure if this counts as a Struts bug or as an Apache bug, or even as a
bug at all. If it is not a bug at all, does anyone have any workarounds for this?

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org