On 1/11/06, Gaet <[EMAIL PROTECTED]> wrote:
> Hi the list,
>
> I know this is not a struts question (unless there is a simpler solution
> with struts :o))
>
> My goal : Add a back button on each of my pages with the url from where the
> user comes (or another url if it comes from a page at a deeper level)

Have you heard about browser navigation buttons?

> So i code the following simple code :
>
> Page A.jsp
> ----------
>
> <% session.setAttribute("backUrl","/initA.do"); %>
> <html:link href="/B.do">Go to B</html:link>
>
>
> Page B.jsp
> ----------
>
> <%
> String backUrl = (String)session.getAttribute("backUrl");
> if (backUrl != null){
>     System.err.println("backUrl is NOT NULL");
> } else {
>     System.err.println("backUrl is NULL");
> }
> %>
>
> And it always prints "backUrl is NOT NULL"...
> Does somebody can explain me?

Isn't it because you just set it on page A ?

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

Reply via email to