"Werff, M.R. van der" wrote:
>
> Hi,
>
> So far so good. It does not work when I'm creating the links from
> information from a session bean:
>
> <A href="management.jsp?id=<%=ka%>"><%=user.getKaName(ka)%></A>
>
> In that case I'm ending up with: management.jsp?id=midip without the
> ;jsessionid=EDGKOOGMNHNH part, and so the user is required to login again
> when accessing this link.
That's expected behaviour as you didn't encode the URL. Before sending a
page to a browser that doesn't support cookies, you *must* invoke
HttpServletResponse.encodeUrl() as this only rewrite an url so the
jsessionid is included.
I'd rather write:
<%
String url = response.encodeUrl("management.jsp?id=" + ka);
%>
<A href="<%= url %>"><%=user.getKaName(ka)%></A>
and it should work.
> Martin van der Werff
Jacek Laskowski