Re: Autoencoding URLs
"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
RE: Autoencoding URLs
encodeURL() see servlet specification this is where Orion actually adds the session data to the URL I think it's part of the response object HTH, JP -Original Message- From: Werff, M.R. van der [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 05, 2000 10:04 AM To: Orion-Interest Subject: Autoencoding URLs Hi, I'm trying to support browsers that don't have cookies enabled. The autoencoding of Orion works fine in most cases. It automatically appends ;jsessionid=EDGKOOGMNHNH to most URLs. It even works on URLs with a parameter: password.jsp?oper=modify becomes password.jsp?oper=modify;jsessionid=EDGKOOGMNHNH. 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. Any help is appreciated. Cheers, Martin. Martin van der Werff KPN Research, PO Box 15000, 9700 CD Groningen, The Netherlands Tel (+31 50 58) 21005, Fax (+31 50) 3122415 [EMAIL PROTECTED]
Re: Autoencoding URLs
You must explicitly encode the URL using... A href=servletResponse.encodeURL("management.jsp?id=%=ka%") %=user.getKaName(ka)% /A Mike --- "Werff, M.R. van der" [EMAIL PROTECTED] wrote: Hi, I'm trying to support browsers that don't have cookies enabled. The autoencoding of Orion works fine in most cases. It automatically appends ;jsessionid=EDGKOOGMNHNH to most URLs. It even works on URLs with a parameter: password.jsp?oper=modify becomes password.jsp?oper=modify;jsessionid=EDGKOOGMNHNH. 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. Any help is appreciated. Cheers, Martin. Martin van der Werff KPN Research, PO Box 15000, 9700 CD Groningen, The Netherlands Tel (+31 50 58) 21005, Fax (+31 50) 3122415 [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/
Re: Autoencoding URLs
In your creating a dynamic url you have to use response.encodeURL("url in here") yourself, Orion will auto encode static urls, and it can even auto encode static absolute urls as far as i know if you set it right in the descriptors, but it does not auto encode dynamic ones, so that is your solution. :) Alex Chudnovsky. - Original Message - From: "Werff, M.R. van der" [EMAIL PROTECTED] Date: Tuesday, September 5, 2000 11:04 pm Subject: Autoencoding URLs Hi, I'm trying to support browsers that don't have cookies enabled. The autoencoding of Orion works fine in most cases. It automatically appends;jsessionid=EDGKOOGMNHNH to most URLs. It even works on URLs with a parameter: password.jsp?oper=modify becomes password.jsp?oper=modify;jsessionid=EDGKOOGMNHNH. So far so good. It does not work when I'm creating the links from information from a session bean: "%=user.getKaName(ka)% 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. Any help is appreciated. Cheers, Martin. Martin van der Werff KPN Research, PO Box 15000, 9700 CD Groningen, The Netherlands Tel (+31 50 58) 21005, Fax (+31 50) 3122415 [EMAIL PROTECTED]
RE: Autoencoding URLs
Hi, You should use encodeURL to perform this correctly regards harry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Werff, M.R. van der Sent: Tuesday, September 05, 2000 6:34 PM To: Orion-Interest Subject: Autoencoding URLs Hi, I'm trying to support browsers that don't have cookies enabled. The autoencoding of Orion works fine in most cases. It automatically appends ;jsessionid=EDGKOOGMNHNH to most URLs. It even works on URLs with a parameter: password.jsp?oper=modify becomes password.jsp?oper=modify;jsessionid=EDGKOOGMNHNH. 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. Any help is appreciated. Cheers, Martin. Martin van der Werff KPN Research, PO Box 15000, 9700 CD Groningen, The Netherlands Tel (+31 50 58) 21005, Fax (+31 50) 3122415 [EMAIL PROTECTED]