> -----Original Message-----
> From: Alexander Brill [mailto:kiowa@...]
> Is it possible to access java variables within Webware? I
> came across a
> problem with IE's handling of the META refresh (it can't load other
> documents). So I'll somehow need to break the process of writing my
> pages (so that the user can get a fair chance in clicking a
> link to the
> new page instead).
> To further understand my problem I've got some code here for you:
> def writeHeadParts(self):
> if (top.location.href.indexOf("index.html") == -1)
> document.writeln('<META http-equiv="refresh"
> // -->
> def writeBodyParts(self):
> if isIndex: #We are on the wrong page the java said
> self.writeln('Click <a href="http://foobar.com">here</a>')
> So in essence, I will need to have the
> isIndex = top.location.href.indexOf("index.html")
I am having a little trouble following what you are trying to do here.
Perhaps some additional contextual information would help. How is it that
the servlet generating the HTML and your Meta tag does not know the URL that
has been requested? Shouldn't it be able to detect the URL requested and
then just do a redirect? Note that the W3C recommends against Meta refresh
in favor of Server Redirects.
that is only available in the browser client. I am not sure how it could be
expected to be directly available on the server where Webware runs. The
only way that comes to mind is to send it to the server when sending a
page by setting the top.location.href? (note my disclaimer)
Now back to your original problem, of the Meta tag being unable to load
other documents. This is a pretty common use of the Meta refresh tag. All
of the examples I have seen use a slightly different format than you listed
in your example. Here is one used on MSNBC to redirect to their Technology
<META HTTP-EQUIV=REFRESH CONTENT="7;
Note they have the URL= tag embedded within the content.