开发者

redirect in jsp adding session ID to GET variables

A friend and I are trying to redirect to a welcome page with jstl. However when we use "<c:redirect url="welcome" />" our session id's are now stored in the GET variables. He's su开发者_如何学编程re that a better way to do things would be with javascript. Is there a correct way in jstl?


Using c:redirect is fine.

I suspect getting the session ID in the URL (ie GET variables) is due to server settings rather than the method you're using for redirect. For example in the tomcat context definition you can override the default behaviour of using cookies for session id communication by setting cookies=false.

I'd discussed the javascript approach in a blog post but there's no real difference in network efficiency and as mentioned above I don't think this will make a difference to the session ID handling.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜