- create a jsp that prints the value of response.encodeURL()
- create a servlet that also prints the value of response.encodeURL()
- add a forward dispatch to the jsp from the servlet's doGet()
- disable cookies in your browser
- access the servlet from your browser
- note the output from the jsp which includes ;sessionid=xxx but the output from the servlet does not
You can deploy the attached WAR and access it at http://localhost:8080/ajetty to observe the different output in your jetty command window.