🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.programmer
Article #319

Javascript/Jsp question:wrong document.location after <jsp:forward...>

#319
From: Li Ma
Date: Thu, 29 Mar 2001 05:55
14 lines
1612 bytes
I got this problem in my code.
In test1.jsp, I forward current page to test2.jsp using
    <jsp:forward url="test2.jsp"/>

In test2.jsp, I want to get document.location in javascript. But I got
test1.jsp instead of test2.jsp.

This happened on Tomcat 3.2. Is this a Tomcat bug or it's what suppose to
be?

And if it's supposed to be like that, then how can I know which real page I
am in from Javascript?

Thanks!
Technical Details
Message-ID: <C7Aw6.443054$w35.69280638@news1.rdc1.nj.home.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!freenix!news-hog.berkeley.edu!ucberkeley!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.nj.home.com.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa3e3,aabed1425c755bc,start
X-Google-Attributes: gidfa3e3,public
X-Google-Thread: 10a146,aabed1425c755bc,start
X-Google-Attributes: gid10a146,public
X-Google-ArrivalTime: 2001-03-28 22:02:03 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!freenix!news-hog.berkeley.edu!ucberkeley!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.nj.home.com.POSTED!not-for-mail
From: "Li Ma" <li_ma@hotmail.com>
Newsgroups: comp.lang.java.programmer,borland.public.jbuilder.ide
Subject: Javascript/Jsp question:wrong document.location after <jsp:forward...>
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <C7Aw6.443054$w35.69280638@news1.rdc1.nj.home.com>
Date: Thu, 29 Mar 2001 05:55:46 GMT
NNTP-Posting-Host: 24.18.226.218
X-Complaints-To: abuse@home.net
X-Trace: news1.rdc1.nj.home.com 985845346 24.18.226.218 (Wed, 28 Mar 2001 21:55:46 PST)
NNTP-Posting-Date: Wed, 28 Mar 2001 21:55:46 PST
Organization: Excite@Home - The Leader in Broadband http://home.com/faster