-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 To whom it may concern,
On 12/10/2009 12:38 AM, bharati wrote: > Iam using Tomcat 6. In my applicaion, when Users entered any url like > 'www.google.com' then it will check for the status of the User. Where does a user enter such a URL? Into the web browser's address bar? If so, your application is not doing anything in this case (since presumably the request will go to www.google.com). > If he is > Inactive, then it will send a http packet to redirect to the particular URL: > like "http://192.168.100.125:8080/" . Tomcat is listening to this port > 8080. Okay, sounds good. > My question is: how do I get the url from tomcat..? Could it be as simple as request.getRequestURL()? This will return "http://192.168.100.125:8080/" in the above example. If you're trying to get the string "www.google.com", you'll probably have to try: request.getHeader("Referer") (note the intentional, historic misspelling of "referer") This may be NULL if the client has been configured not to send the URL of the referring page, though. Is that what you were looking for? I agree with the other responses that your question was quite unclear. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkshfyIACgkQ9CaO5/Lv0PAJ8wCeKmg8Gj7/AIZb4FM5pWKyr0uI fY8An1sUIwWWCvsGKZXH2kQUs+oe403w =Qxrl -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org