Re: URL Redirect in Tomcat 6

2009-12-10 Thread Pid

On 10/12/2009 05:38, bharati wrote:


Hi,
  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.



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.



  My question is: how do I get the url from tomcat..? If manually user types
the url http://192.168.100.125:8080/  then it is displaying proper page to
login.



But in this case, Internet User does not know the URL. so...i need to get
the URL from Tomcat which is listening to 8080 Port.

Please help me.
Thanks in advance.


I'm baffled, I don't know about anyone else...  Perhaps you could 
rephrase your question in a way that might allow us to help you?


 http://catb.org/~esr/faqs/smart-questions.html


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: URL Redirect in Tomcat 6

2009-12-10 Thread Hadole, Nishant IN BOM SISL
I guess she wants to display Customizable error responses, when application 
fails to respond (error code like 404 etc). Though, I agree, the question is 
not properly framed... 

With best regards,
Nishant Hadole
 
Siemens IT Solutions and Services
SIS PRO SI-I
Tel.: +91 22 2495 7816
Fax: +91 22 6660 8521
Mailto: nishant.had...@siemens.com
www.siemens.co.in

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Thursday, 10 December, 2009 02:29 PM
To: users@tomcat.apache.org
Subject: Re: URL Redirect in Tomcat 6

On 10/12/2009 05:38, bharati wrote:

 Hi,
   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.
 
 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.
 
   My question is: how do I get the url from tomcat..? If manually user types
 the url http://192.168.100.125:8080/  then it is displaying proper page to
 login.
 
 But in this case, Internet User does not know the URL. so...i need to get
 the URL from Tomcat which is listening to 8080 Port.

 Please help me.
 Thanks in advance.

I'm baffled, I don't know about anyone else...  Perhaps you could 
rephrase your question in a way that might allow us to help you?

  http://catb.org/~esr/faqs/smart-questions.html


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: URL Redirect in Tomcat 6

2009-12-10 Thread Christopher Schultz
-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