Setting session attributes and URL rewriting are two different things. You can set session attributes using session.setAttribute() method. You can perform URL rewriting using response.encodeURL or c:url JSTL tag in JSPs...
URL re-writing is a part of session management.
you can manage the session by four Ways..
1. Session
2. Hidden Form Field
3. URL re-Writing
4. Cookies.