Hi Christopher,

I'm late with this, but I didn't see an answer yet.

Try replacing <BASE HREF="default.htm">

with
        <FRAME HREF="default.htm">

it seems to work for me.

Thanks,

Mike

>X-Accept-Language: en
>MIME-Version: 1.0
>Date: Mon, 12 Apr 1999 13:39:08 -0400
>From: Christopher Cobb <[EMAIL PROTECTED]>
>Subject: Re: Login revisited: forward() vs redirect()
>Comments: To: "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>
>Hans Bergsten wrote:
>
>> Christopher Cobb wrote:
>> >
>> > > Actually, I tried opening the .html file and just sending the bytes back
to the
>> > > browser.  This didn't work either because the 'environment' (current
document
>> > > directory, etc.) was not correct.  It happens that the .html file I'm
trying to open
>> > > uses frames.  It could not find the frame pages because the environment
was still
>> > > set to the servlet's environment rather than the .html file's
environment.
>> >
>> > Hans Bergsten wrote:
>> >
>> > > You can probably solve that problem by adding a <BASE HREF> tag in the
<HEAD>
>> > > part of the HTML file, e.g.
>> > >
>> > >   <HEAD>
>> > >   <BASE HREF=/base/path/for/frame/pages>
>> > >   </HEAD>
>> >
>> > Excellent suggestion!  Unfortunately, even with the <BASE> tag as the first
thing
>> > in my <HTML> tag, I still get the following error message:
>> >
>> > "Netscape is unable to find the file or directory named /xyz/logo.html.
Check the
>> > name and try again."
>> >
>> > The funny thing is, /xyz/logo.html is exactly the right name.  I still
think there
>> > is something funny in the environment that the servlet has defined vs the
environment
>> > that the web page needs.
>>
>> The browser only cares about URLs. It has no idea how the HTML pages was
generated.
>> So if the URL for the current page is /servlet/theServletThatGeneratedThePage
>> and you have a relative URL in the page, e.g. logo.html, the browser will
form
>> an absolute URL based on the current URL, i.e. /servlet/logo.html in this
example.
>
>Yes, I'm following you so far.
>
>> If you use a <BASE HREF> tag, the browser will use it instead of the current
URL
>> to resolve relative URLs.
>
>OK.  What I have in my 'toplevel.html' file is:
>
><HTML>
><HEAD>
><base href="/xyz/toplevel.html">
><TITLE>...</TITLE>
></HEAD>
><frameset ...>
> <frame src="logo.html" ...>
>...
></HTML>
>
>This was a page authored by someone else.  There is no <body> tag here, and I
assume this is correct with respect to using framesets.
>
>If I type http://localhost/xyz/logo.html into the browser's location field, it
has no problem finding it.
>
>And if I type http://localhost/xyz/toplevel.html, everything looks fine.
>
>But if I type http://localhost/servlet/GuardServlet/xyz/toplevel.html, I get
the 'unable to find /xyz/logo.html' message for each frame in the set.
>
>> Finally, if you use absolute URLs there's no resolving needed so the browser
>> goes out and asks for the URLs exactly the way they are defined in the page.
>
>Well, absolute references don't work either.  If I change my toplevel.html file
to be:
>
>...
><base href="/xyz/toplevel.html">
>...
> <frame src="/xyz/logo.html" ...>
>...
>
>(changing the frame reference to be absolute instead of relative) I still get
the same 'unable to find /xyz/logo.html' error as before.
>
>The only reference that works is a fully qualified URL:
>
>...
><base href="/xyz/toplevel.html">
>...
> <frame src="http://localhost/xyz/logo.html" ...>
>...
>
>
>> So take a close look at you HTML file again. Is the <BASE HREF> in the <HEAD>
>> part of the page, as opposed to the <BODY>? You mentioned frames. Did you add
>> the <BASE HREF> to both the page with the FRAMESET and the pages shown in the
>> frames?
>
>Are you saying that I need to add a <BASE ...> tag to each frame file?  But
it's not getting that far:  it can't locate the frame file at all so the
contents of the frame file surely don't matter (yet).
>
>> There must be some mistake of this nature. Again, if the HTML is correct
>> the browser couldn't care less about how it was generated.
>
>Since there is only two short html files involved here (one with 32 lines and
another with 13 lines), I would be happy to have anyone examine them more
closely (they are attached to this message).  Again, I am not the author of
these pages.  I'm just trying to get them to work with JSP.
>
>BTW, thanks for your lengthy and patient reply.
>
>Chris
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to