Hello,
Lets say I have a machine that hosts tomcat, cas and my webapp. My webapp 
requires that it be accessed only via an absolute url that contains the name of 
the server. What I mean by that is- If a user attempts to use the ip of the 
server as in, say, 172.167.243.12:8080/DDD/main.jsp, some code within the app 
redirects the browser back to http://myserver:8080/DDD/main.jsp. Similarly, if 
a user logins in to the server and tries to access the application using 
http://localhost:8080/DDD/main.jsp (locally using a browser on the server 
itself), he is again redirected to http://myserver:8080/DDD/main.jsp. So, 
basically, my webapp *requires* that the initial part of the url be 
http://myserver:8080/DDD.

The problem- I set the serverName to localhost:8080 in web.xml. Then I try to 
access my app using http://myserver:8080/DDD/main.jsp. I get authenticated and 
CAS tries to redirect me to http://localhost:8080/DDD/main.jsp. The code in my 
webapp figures out that "localhost" is being used instead of "myserver" and 
redirects to http://myserver:8080/DDD/main.jsp as required by the app. This 
causes CAS to authenticate again (I am NOT asked for username/password again) 
and CAS again redirects to http://localhost:8080/DDD/main.jsp and the cycle 
continues endlessly.

How do I fix this? What value can I use for serverName? Is there a way by which 
I can prevent the second redirect from within my application to not go to CAS? 
I tried adding "?gateway=true" to the second redirect Url. But that didn't help.

Appreaciate any help.

Thanks.


 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to