Hello,
I'm new to the forum. I have a strange problem with my tomcat installation.
I'm using tomcat5.5.26 and struts for my web projekt.

I configured the projekt in a context file, like this :
<Context path="" docBase="C:\webprojekt" debug="1" reloadable="true"
crossContext="true" cookies="true">

I set the attribute cookies to 'true' because I want to have session
cookies.

Furthermore I added the following lines to the index.jsp to display the
cookies :

out.println("<h>Cookies : </h>");
Cookie[] cookies=request.getCookies();
if(cookies==null) { 
out.println("No cookies");
} else {
Cookie MyCookie;
for(int i=0;i<cookies.length;i++) {
MyCookie=cookies[i];
out.println(MyCookie.getName() + "="+MyCookie.getValue());
}
}


My problem is now when I open the webapp with the url http://localhost
everythink is fine. The session cookie wil be created and the output of the
script above is like : 
Cookies : JSESSIONID=05E932958950B69BE03874B8FCE26C3E 

But when I open the webapp over the internet with an URL like
www.myprojekt.com tomcat will not create an session cookie. Tomcat adds the
jsessionid to the URL's and teh output of the script above is :
Cookies : No cookies

What is the problem ? Why can't tomcat create session cookie for
www.myprojekt.com ?

Thanks,
Mario




-- 
View this message in context: 
http://www.nabble.com/Tomcat-will-not-create-session-cookie-tp17819920p17819920.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to