Search code examples
javarestservletsspring-roo

Why is my session id in my url?


So I went through the steps to build a basic roo application here: http://static.springsource.org/spring-roo/reference/html/beginning.html

I started up my server and started playing with the app, couldn't help but notice that there's a 'jsessionid' in my url:

http://localhost:8080/pizzashop/pizzas;jsessionid=0A8EA5D9E8665C8AC80F141C3818F6BA?form

I don't care for this at all! Why does it need a session id in the URL? Can I get rid of this? It does not seem RESTful to have this there.


Solution

  • This is standard JavaEE behavior, and is dictated and controlled by the servlet container. It has nothing to do with Spring.

    See this previous question to find out why and when it gets created, and how to avoid it.