Bug 3868 - io:http after browser refresh shows blank page with servers that cache tags
Summary: io:http after browser refresh shows blank page with servers that cache tags
Status: CLOSED DUPLICATE of bug 5450
Alias: None
Product: Taglibs
Classification: Unclassified
Component: IO Taglib (show other bugs)
Version: 1.0
Hardware: PC other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-28 07:43 UTC by Stephen Dupre
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Contains all files required for bug except copy of JRun. (19.18 KB, application/octet-stream)
2001-09-28 07:45 UTC, Stephen Dupre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Dupre 2001-09-28 07:43:17 UTC
<%@taglib uri="http://jakarta.apache.org/taglibs/io-1.0" prefix="io" %>
<io:http url="http://www.allaire.com" action="get" />

Our JRun 3.1 server has tag caching.  When we use this in a JSP, we get the 
page the first time but not the second during refresh of the browser.

Steps:
1.  If you have JRun 3.1 16777 or higher 
NT
http://download1.allaire.com/publicdl/en/jrun/31/jr31_MPSB_03_04_05_06.exe 
Unix/Linux
http://download1.allaire.com/publicdl/en/jrun/31/jr31_MPSB_03_04_05_06.sh

installed and the default server running.  (No key is required).

The install should pretty much get you running.  NT starts up immediately and 
brings you to http://localhost:8000 - our html admin server.  The default 
server and web server you'll use is on http://localhost:8100.

Going to http://localhost:8100/demo should bring up a 'demo' examples page when 
the install is complete and default server running.

Do the following:

File 26888.zip will be mailed or included - it contains a subset of the Jakarta 
tag library - enough to run io:http

It contains tagtest.jsp, io.jar, web.xml and io.tld files.

-Place tagtest.jsp in web-app root (like /JRun/default/demo-app).
-Place web.xml and io.tld in /JRun/default/demo-app/WEB-INF. 
(if you're using JRun/default/demo-app, rename the existing web.xml to 
web.xml.orig first)

-Place io.jar in \JRun\default\demo-app\WEB-INF\lib

- Restart JRuns Default server and and run tagtest.jsp.

Unix - cd /usr/jrun/bin
jrun -start default &

NT
right mouse on the 'default server' in the sys tray and pick restart.

when the server is up (10 seconds or less), browse to

http://localhost:8100/demo/tagtest.jsp

The Allaire home page will display (WITHOUT IMAGES - THIS IS OK).  
- Click the browser refresh button - it now shows blank.

We found a workaround:  (and a bug according to Tom Reilly 
(treilly@allaire.com - the JRun developer).

(JRun) 3.0 didn't reuse tag handlers, 3.1 does.  This relies on a 
properly coded release method which was the problem with the tag in question.

Look at the initialization in the release method and compare that to the 
release method.  The release method should be setting output to true. 

Workaround:
Set the output="true" in the properties

Change:
<io:http url="http://www.allaire.com" action="GET" />
to
<io:http url="http://www.allaire.com" action="GET" output="true" />

You could also make this a REQUIRED attribute so you get a "REQUIRED 
attribute"  error when someone leaves it off (until the bug is fixed).

In io.tld, make sure it has the following:

<name>http</name>
<tagclass>org.apache.taglibs.io.HttpTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>url</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>output</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
Comment 1 Stephen Dupre 2001-09-28 07:45:47 UTC
Created attachment 608 [details]
Contains all files required for bug except copy of JRun.
Comment 2 James Strachan 2001-12-20 07:25:36 UTC
Hi Stephen

Sorry for the long delay getting back to this one. Artem Grigoryan found the 
issue with this one - the instance variable output was erroneously being set to 
false rather than true.

This fix has been applied and is now in CVS so the next nightly build should 
work fine I think.

James

*** This bug has been marked as a duplicate of 5450 ***