sessions are unique to the virtual hosts. You will have to maintain the session information yourself through a common database, or use different contexts instead of virtual hosts.
If you don't want to use tomcat's built-in authentication, you can use a filter to enforce login before accessing your protected resources Charlie > -----Original Message----- > From: MURAT BALKAS [mailto:murat.balkas@;o2.net.tr] > Sent: Wednesday, October 30, 2002 9:59 AM > To: [EMAIL PROTECTED] > Subject: VirtualHosts and tomcat > > > Hi, > > I'm still trying to make tomcat support virtual > hosting. I gave up > fighting with connectors and trying to do it with tomcat's <Host> > Container. > > Some info : > ----------- > > My Engine's defaultHost is : localhost > The docBase of the Host with the name localhost is : mobileservices > > <Server port="8005" shutdown="SHUTDOWN" debug="0"> > <Service name="Tomcat-Standalone"> > <Connector > className="org.apache.catalina.connector.http.HttpConnector" > port="443" minProcessors="5" maxProcessors="75" > enableLookups="true" > acceptCount="10" debug="0" scheme="https" > secure="true"> > <Engine name="Standalone" defaultHost="localhost" debug="0"> > <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"> > <Context path="" docBase="mobileservices" debug="0" reloadable="true" > crossContext="true"/> > > Now the question is : > > With the configuration above everything is working. I > want to add > another host which one should have a docBase as > mobileservices/o2.net. But, > if I add the following lines after the above working Host, I > couldn't log > in. I think that the session data is not transfered between Hosts' or > contexts. Am I right? If yes, how can I solve this. > > <Host name="second.rt.net.tr" debug="0" appBase="webapps" > unpackWARs > ="true"> > > <Valve className="org.apache.catalina.valves.AccessLogValve" > directory="logs" prefix="o2sms_access_log." > suffix=".txt" > pattern="combined"/> > > <Logger className="org.apache.catalina.logger.FileLogger" > directory="logs" prefix="o2sms_log." suffix=".txt" > timestamp="true"/> > > <Context path="" docBase="mobileservices/o2.net" debug="0" > reloadable="true" crossContext="true" > privileged="true" /> > > <!-- If I do not add the following lines I get "/o2.net no�t > found" --> > <Context path="/o2.net" > docBase="mobileservices/o2.net" debug="0" > reloadable="true" crossContext="true"/> > > </Host> > > The login process is as follows : > > If the username, password and company ID is OK, the user is > redirected to a HOME related to the company, e.g. > mobileservices/o2.net. > So, if I go to https://first.rt.net.tr and give the right values for > username/password/company ID I'm redirected to > mobileservices/o2.net and > everything is OK. But, if I go to https://second.rt.net.tr > with docBase as > mobileservices/o2.net and although I give the right values for > username/password/company ID, I get "wrong username or password". > > And, in my log files, I see session values are null for all of > username/password and company ID. The session values get lost > somewhere. I > don't know where... > > This is the problem. :) > > Murat BALKAS > > P.S. : I'm not the developer of the application running on tomcat. > > > -------------------------------------- > Bu e-posta sadece yukarida isimleri belirtilen kisiler > arasinda ozel > haberlesme amacini tasimaktadir. Size yanlislikla ulasmissa > lutfen mesaji > geri gonderiniz ve sisteminizden siliniz. Rt.Net > Internet Hizmetleri > Pazarlama ve Ticaret A.S. bu mesajin icerigi ile ilgili > olarak hic bir > hukuksal sorumlulugu kabul etmez. > > This e-mail communication is intended for the private use > of the persons > named above. If you received this message in error, > please immediately > notify the sender and delete it from your system. > Rt.Net Internet > Hizmetleri Pazarlama ve Ticaret A.S. does not accept legal > responsibility > for the contents of this message. > -------------------------------------- > > > > > -- > To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
