<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[JavaRanch: Latest posts for the topic "Session Management"]]></title>
		<link>http://www.coderanch.com/forums/t/18/Web-Component-Certification-SCWCD/Session-Management</link>
		<description><![CDATA[Latest messages posted in the topic "Session Management"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Session Management</title>
				<description><![CDATA[public void doGet(<a href="http://java.sun.com/javaee/6/docs/api/javax/servlet/http/HttpServletRequest.html" class="api" title="Java API" target="_new" rel="nofollow">HttpServletRequest</a> req,<a href="http://java.sun.com/javaee/6/docs/api/javax/servlet/http/HttpServletResponse.html" class="api" title="Java API" target="_new" rel="nofollow">HttpServletResponse</a> res)throws <br /> <a href="http://java.sun.com/javaee/6/docs/api/javax/servlet/ServletException.html" class="api" title="Java API" target="_new" rel="nofollow">ServletException</a>,<a href="http://java.sun.com/javase/6/docs/api/java/io/IOException.html" class="api" title="Java API" target="_new" rel="nofollow">IOException</a><br /> {<br /> <a href="http://java.sun.com/javaee/6/docs/api/javax/servlet/http/HttpSession.html" class="api" title="Java API" target="_new" rel="nofollow">HttpSession</a> ses=req.getSession();<br /> <a href="http://java.sun.com/javase/6/docs/api/java/io/PrintWriter.html" class="api" title="Java API" target="_new" rel="nofollow">PrintWriter</a> out=res.getWriter();<br /> if(ses.isNew())<br /> out.println("new session");<br /> else<br /> out.println("welcome back");<br /> }<br /> }<br />  <br /> In the above example if the cookies are disabled then the program will always written new session.<br /> But I've tried this program after disabling the cookies but it writtens welcome back when I refresh the window.How is it possible?]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844271</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844271</link>
				<pubDate><![CDATA[Thu, Mar 22 2007 14:22:00 MDT]]></pubDate>
				<author><![CDATA[Steve Jerome]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[If cookies are disabled then container will automatically fall back for URL rewriting for session management.<br />  <br /> Hope it helps]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844272</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844272</link>
				<pubDate><![CDATA[Thu, Mar 22 2007 22:20:00 MDT]]></pubDate>
				<author><![CDATA[Amirr Rafique]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[Yes, the container will fall back to URL Writing, but this is only if we write the code for it..]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844273</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844273</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 04:34:00 MDT]]></pubDate>
				<author><![CDATA[Nikhil Jain]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[But I didn't write any code for URL rewriting.Can anyone try this program and tell what happens.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844274</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844274</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 07:04:00 MDT]]></pubDate>
				<author><![CDATA[Steve Jerome]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[As far as i know the server first tries to use Cookie by default as a session tracking mechanism, if the cookies are disabled then it uses URL Rewriting by default. Hence in your case the session is still active.<br />  <br /> Shrenik Sakriya]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844275</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844275</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 07:35:00 MDT]]></pubDate>
				<author><![CDATA[Shrenik Sakriya]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[yeah that's right only if you use URL rewriting in your code.but I didn't use URL rewritig as I said before.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844276</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844276</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 08:48:00 MDT]]></pubDate>
				<author><![CDATA[Steve Jerome]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[Your code works fine in my case, i.e. it only shows "new session" when refreshing the page and cookies are disabled (I'm using Firefox). Are you sure cookies are disabled in your browser? (just checking)<br /> [ March 23, 2007: Message edited by: Johan Pelgrim ]<br /> ]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844277</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844277</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 09:16:00 MDT]]></pubDate>
				<author><![CDATA[Johan Pelgrim]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[<blockquote class="uncited">
			<div>Originally posted by Shrenik Sakriya:<br /> As far as i know the server first tries to use Cookie by default as a session tracking mechanism, if the cookies are disabled then it uses URL Rewriting by default. Hence in your case the session is still active.<br />  <br /> Shrenik Sakriya</div>
		</blockquote><br />  <br /> No. the server will use both at the first response if you did use URL rewriting in your code. if cookie is enabled, then subsequent responses will ignore URL rewriting in your code. otherwise, they will use URL rewriting.<br />  <br /> Think about it. If hte server only uses cookie as default on the first response, what if the cookie is disabled by the user? then the next request comes in without any session id information, then the server will have to create a new session. This is certainly not what we want.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844278</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844278</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 09:52:00 MDT]]></pubDate>
				<author><![CDATA[warren li]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[I tried firefox and the program works fine dispalying new session everytime.but it doesn't work with IE.can anyone tell me what's the problem.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844279</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844279</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 13:09:00 MDT]]></pubDate>
				<author><![CDATA[Steve Jerome]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[<blockquote class="uncited">
			<div>Originally posted by Steve Jerome:<br /> but it doesn't work with IE.can anyone tell me what's the problem.</div>
		</blockquote><br />  <br /> IE?<br />  <br /> Try flushing your cookies and then doing a refresh.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844280</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844280</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 13:57:00 MDT]]></pubDate>
				<author><![CDATA[Sergio Tridente]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[<blockquote class="uncited">
			<div>Originally posted by Sergio Tridente:<br /> <br />  <br /> IE?<br />  <br /> Try flushing your cookies and then doing a refresh.</div>
		</blockquote><br />  <br /> IE-Internet Explorer.I've already tried deleting the cookies but no use.can anyone able to run the program in internet explorer?]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844281</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844281</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 14:17:00 MDT]]></pubDate>
				<author><![CDATA[Steve Jerome]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[I ran the program on IE 6. No problem faced. I kept 'Medium High' in the Privacy tab of Tools/Internet Options.<br />  <br /> First time you get new session and when you refresh you get welcome back.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844282</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844282</link>
				<pubDate><![CDATA[Fri, Mar 23 2007 23:57:00 MDT]]></pubDate>
				<author><![CDATA[Sunder Ganapathy]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[<blockquote class="uncited">
			<div>Originally posted by Sunder Ganapathy:<br /> First time you get new session and when you refresh you get welcome back.</div>
		</blockquote><br />  <br /> Actually the program runs fine and the output is what you are getting with cookies enabled.But the problem is running the program after disabling cookies(Read the first Question of the forum).When you disable cookies you should get only new session every time you refersh the browser.But instead welcome back is printing.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844283</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844283</link>
				<pubDate><![CDATA[Sat, Mar 24 2007 06:56:00 MDT]]></pubDate>
				<author><![CDATA[Steve Jerome]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[Apparently the difficulty you are having in IE is due to the way IE treats the localhost domain.  I was able to repeat your problem and after some research uncovered this article:<br />  <br /> &lt;a href="http://www.techfeed.net/blog/index.cfm/2005/11/7/IE-cookies-and-localhost" target="_blank" rel="nofollow"&gt;http://www.techfeed.net/blog/index.cfm/2005/11/7/IE-cookies-and-localhost&lt;/a&gt;<br />  <br /> It identifies the problem and then a comment on the blog gives the solution for testing... and not it's not always use firefox   <img src="http://www.coderanch.com/images/smilies/8a80c6485cd926be453217d59a84a888.gif" />]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844284</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844284</link>
				<pubDate><![CDATA[Mon, Mar 26 2007 13:30:00 MDT]]></pubDate>
				<author><![CDATA[Clifton Eaton]]></author>
			</item>
			<item>
				<title>Session Management</title>
				<description><![CDATA[Thanks Eaton for your solution.now my code works fine.]]></description>
				<guid isPermaLink="true">http://www.coderanch.com/forums/posts/preList/174592/844285</guid>
				<link>http://www.coderanch.com/forums/posts/preList/174592/844285</link>
				<pubDate><![CDATA[Mon, Mar 26 2007 16:13:00 MDT]]></pubDate>
				<author><![CDATA[Steve Jerome]]></author>
			</item>
	</channel>
</rss>
