----- Original Message ----- From: "WILLIAMer" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Tuesday, July 08, 2008 9:23 AM
Subject: RE: tomcat with jcaptcha



Thanks for reply ,Sameer :)

for me,
webapps
  |
  - eCom - Admin - Login.jsp
             - Account - *.jsp
eCom is a webapps and Admin is a directory under eCom , right?
I just strange why i set the eCom default apps(it means root dir/path),
the sessions are different between eCom and Admin.

If i dont set the eCom default, the session is the same between eCom and
Admin.

I need to set eCom default for making url like "http://myDomain/"; , but not
"http://myDomain/eCom/";
Now, i can set the eCom default.But i cant work out the sessions.
--
View this message in context: http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18333397.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

When you say "default"... are you putting your login.jsp under ROOT?
ROOT *is* a webapp as well... so your session will break ;)

Try this.... make a index file under root and put this in it...

   <%
       String redirectURL = "http://myDomain/eCom/login.jsp";;
       response.sendRedirect(redirectURL);
   %>

So if they hit the "default"... it will send them to the right place ;)

You could also make a nice HTML page that says WELCOME TO eCOM

and then have a LOGIN LINK with  http://myDomain/eCom/login in it.

That will work because the HTML page doesnt need a session...

But if you stick a login page on ROOT.... TC creates a session and then logs you into *ROOT* /.... not /eCOM...
And then eCom will make them login again... session not the same.

Like the other guys say.... you can do anything under http://myDomain/eCom/Anything_Under_Here_Is_Same_Session

But if eCom changes.... its a different web app ;)

ROOT is a special webapp with /

but /eCom.... does not mean ROOT/eCom.... it just means /eCom

Ha ha... you think too much... but look at this...

ROOT WEBAPP
/FolderA (index.jsp)

FolderA WEBAPP
index.jsp

They both have the same URL http://domain/FolderA/index.jsp

I dont know what will happen.... but one webapp is going to only work...

Can you see why ROOT is special.... its because it can steal othe webapps contexts... ;)

Ha ha... I think you going to be a very good Tomcat programmer ;)

Have fun...

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------




---------------------------------------------------------------------
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