Hi!
I'm working with JBoss (4.0.3), EJB 3.0 and JSP.
I have developed a petsore web application, with ejb 3.0 and jsp.
I have some entities and session beans (one stateful for a cart and theothers are stateless), one servlet and and 5 jsp pages.
If I invoke the app with the network IP address (with this call:
http://192.168.2.2:8080/petshop)
everything is working fine, but if I do it like this:
http://localhost:8080/petshop
OR
http://127.0.0.1:8080/petshop)
the httpSession is getting generated again and again; everytime when my controller Servlet is invoked!
First I thought, that cookies are disabled, but they were NOT!
Nevertheless, I reprogramed the application:
I rewrote every Hyperlink in the jsp files tho this style:
response.encodeURL(url)
But the session becomes generated again and again!
Can someone - please - tell me, what I'm doing wrong?
OK!
I found out myself, that the problem is the session tracking of jsp.
The soloution is to use response.encodeURL(url) methods instead of normal hyperlinks.
But what do one do, who has to use http forms?