Cookie « Session « JSP-Servlet Q&A

1. cookies vs session

I am in the training of web developement.Now i am learning jsp & servlet.I have some idea about HttpSession.I used HttpSession in some of my sample projects also.In browsers i have ...

2. How do I send the jsessionid via POST using hidden inputs when cookies are disabled in JSP?

Is there any way to send JSESSIONID via hidden inputs? Something like

<input type="hidden" name="JSESSIONID" value="<%= session.getId() %>"/>
I tried everything but nothing seems to be working. It works if I directly access ...

3. Manage Session when broswer has disable cookies

I wants to know that How can i Manage Session if the client browser has disabled cookie feature.. If I wants to implement it in simple JSP - Servlet, then how can ...

4. how can i do sessions in java if some one disables cookies in my browser?

I like to know if someone disables the cookies in my browser then cookies dont work for my browser then how can I do sessions in java. I am writing servlets ...

5. Problem with two servlet engine cookies-based sessions in one browser

Recently we met problem with sessions in our Java web app hosted in Tomcat. Sometimes our users share one computer and browser for working with web app. Web app uses cookies-based sessions. ...

6. How can I set session cookies to be Http-Only in servlet API 2.5?

How can I set session cookies to be Http-Only in servlet API 2.5? The Cookie.setHttpOnly method was added in servlet API 3.0.

7. jsp webapp session misbehaving

I have inherited a jsp webapp that works on a windows 2003 server and a windows 7 laptop, but refuses to work on a windows 2008 server - it gives load ...

8. Creating cookie with content-type excel issue

I am trying to set a cookie and then set the content-type to excel as part of directing the browser to show the download dialog to the user. At the moment I ...

9. Set the SMSESSION cookie to get the response back

I am trying to get the response back from the server. So for that what I did is, I passed my username and password in the code for authentication because that ...

10. When are cookies are preferable than sessions?

public class ServletDemo extends HttpServlet{

    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException{


11. Cookie handling with Servlet

I am having a problem of setting the data of a (persistent/cross browser session) cookie correctly inside a Servlet and the reading it in a Filter. the code of the Servlet (running ...

12. Default session expiration timeout?

By default the JSESSIONID cookie is expired when you close the browser, but how long is the associated HttpSession really valid on the server side?

13. what if broswer does-not allow cookie

I am working on a web based application with JSP and servlets. I am using the Cookie class and response.getCookie method to set cookies in the browser. But I have a ...

14. Sessions without cookies possible?

Hi! I am planning to use Apache 2/Tomcat 4 for a web project for my thesis. One important fact is that I have to control user sessions without using cookies. During the whole visit on the webpage I want to control the users language selection. Moreover, if the user has logged in, I want to store some more values (his rights, ...

15. cookies are disable/session

Marg Had some trouble getting this to post, it looks like it doesn't like the word cookie in the code below so I to put a space in the word... Like Mike said the easiest way to do it, and avoid a round trip to the server, would be to use java script. All you need to do is set a ...

16. session & cookie

17. Session VS Cookie.

18. Cookies and HTTPSession

19. Regarding sessions and cookies

20. Help Regarding Cookies and session

22. session tracking in jsps using cookies

25. Handle session ID after deleting cookies

I am trying to open multiple tabs in one session say Session 1 and page1, page2, page3. If I logout of session1 from page 1 and delete the coookies and relogin to the same page(page 1) say session 2. Now if i click on page2 the new sessionID (session 2) is obtained and this session 2 does not have any form ...

27. servlets and session tracking with cookies

28. HttpClient, JSP, cookies and sessions