I think to solve your problem, you're going to need to define the problem in
broader terms.  A redirect is much like a forward, except the client doesn't
know about it.  Once the Action has executed and mapped to a page, a
redirect is executed (unless you specify a forward).  Either way, what this
means is that after Struts finds the URL to access after it processes your
action, the request is against that JSP, and the previous request URL is
gone from the HTTP headers.

What's the overall problem you're trying to solve?  That may be a better
approach, because given the parameters of the current problem, you're walled
in with nowhere to go.  It sounds like perhaps you're trying to solve some
sort of navigation or form population problem?

-Rob

-----Original Message-----
From: Kevin Tung [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 5:05 PM
To: Struts Users Mailing List
Subject: RE: [Tiles] loses current url


Ok.. I think I over-simplified my scenario :) sorry.

What I have in fact, is the following

    <definition name="Layout" path="/layout.jsp">
        <put name="header" value="/header.jsp" type="page"/>
    </definition>

in the tiles-defs.xml file. and

    <action     path="/Layout" forward="Layout"/>

in the struts-config file

When I access the url http://myhost/Layout.do the request.getRequestURL()
call from both the layout.jsp and the header.jsp files return
"http://myhost/layout.jsp"; and not "http://myhost/Layout.do";

Is this by design? is there anyway to get the correct "original" url from
within these jsp pages?

Thanks,
Kevin

-----Original Message-----
From: Rob Kischuk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 3:43 PM
To: 'Struts Users Mailing List'
Subject: RE: [Tiles] loses current url


In the header file, try request.getRequestURL() - it should give you the
page that was called.  Tiles effectively does a jsp:insert, which means that
the request parameters are the same for any included tiles.

-Rob

-----Original Message-----
From: Kevin Tung [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 3:17 PM
To: Struts-user
Subject: [Tiles] loses current url


Is there anyway for a tiles component to detect the URL that was used to
call up the page in the first place?

For example,

http://myhost/mypage1.jsp
http://myhost/mypage2.jsp

may both contain a tiles:insert tag that points to /myheader.jsp

is there anyway for the header file to detect which of the two url's were
called by the user?  Without adding code in mypage1 & mypage2 to save the
url in the session/request/page/application scope.  And without adding
request parameters to the tiles:insert tag.

Is this possible with Struts 1.1b3?

Thanks,
Kevin



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to