I need to pass the URL from the including page to the included page within the same http request and not across requests (hence the form, hidden variables are not needed). Let me illustrate with an example. Lets say I have searchResults.jsp that lists a page of results and at the bottom, I include a pagination bar that lists the various page numbers.
searchResults.jsp looks some like: <!-- a whole bunch of code --> <!-- create a baseurl --> <s:url id="baseUrl" action="search.action"> <s:param name="keyword" value="#parameters.keyword"/> <s:url> <!-- ??? how do I pass the baseUrl to paginationInclude.jsp --> <!-- I can set it as a request attribute or push it to the value stack, but when I retrieve it later, will it retain all the parameters --> <jsp:include page="paginationInclude.jsp"/> paginationInclude.jsp needs to do the following: <!-- list the various page numbers --> <!-- for each page number generate the appropriate url --> <s:url id="pageNumUrl" ...> <!-- get the "base url" that was set in searchResults.jsp which itself may contain some initial parameters --> <!-- Then add an extra param called pagenum --> <!-- How do I do the above two steps??? --> </s:url> Hope that clarifies the problem further. Thanks Srinivas Himanshu Ranavat wrote: > > Hey Srinivas > > Maybe u cud create a form and create a hidden variable to pass the URL > around between different pages. Retrieve the URL from the form, process > it if u need, add it again as a hidden variable in a form in the next > page. try to submit the form by post. > > Also see if this helps: > > http://struts.apache.org/2.x/docs/how-can-we-access-request-parameters-p > assed-into-an-action.html > Himanshu > > > -----Original Message----- > From: Srinivas.N. [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 29, 2007 6:43 PM > To: user@struts.apache.org > Subject: [S2] Passing URL as parameter between JSP pages > > > I am developing an app for which there is a common pagination bar (call > it > "paginationInclude.jsp") that is included at the bottom of several > different > pages. > > The pagination include needs to get a "base url" from the including page > and > then append a "pagenum" param to that URL to generate the final URL for > the > numbers in the pagination bar. > > How do I pass the "base url" from the including page - if I use <s:url> > tag > to generate the "base url" in the including page how do I retrieve that > in > paginationInclude.jsp and how do I just attach an extra param to the > base > url in "paginationInclude.jsp" to generate the new url? > > Thanks > Srinivas > -- > View this message in context: > http://www.nabble.com/-S2--Passing-URL-as-parameter-between-JSP-pages-tf > 4167563.html#a11856984 > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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] > > > -- View this message in context: http://www.nabble.com/-S2--Passing-URL-as-parameter-between-JSP-pages-tf4167563.html#a11858362 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]