Re: howto query which domain?

2008-06-24 Thread Michael Sparer


I triggered it in the doFilter method of a filter, however you surely know
how to get the request from inside a wicket component ;-)

For me, it went like that:

public void doFilter(final ServletRequest request, final ServletResponse
response, final FilterChain chain) throws IOException, ServletException {

final Request req = (Request) request;

final HttpFields fields = 
req.getConnection().getRequestFields();
final String hostField = fields.getStringField(Host); // that's the field


hope that helps

Michael



Nino.Martinez wrote:
 
 Hi I have a vhost which has several serveraliases, how can I check for 
 which one is being triggered?
 
 Something like this:
 
 if serveralias=myalias then{
RequestHeadder add domain myalias
 }
 
 I've tried location, but it does not seem to be the thing..
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/howto-query-which-domain--tp18075564p18089774.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: howto query which domain?

2008-06-24 Thread Nino Saturnino Martinez Vazquez Wael
Hehe, thanks for your response I sent it to the wrong forum, not wicket 
related, too many posts to wicket I guess.. :) It were supposed to goto 
[EMAIL PROTECTED]


Problem are that I use apache2 http server to forward my requests. And I 
want todo skinning dependant on domain names, however domain are 
always set to localhost.. If I use preserve host then I get the 
application path appended, which are wrong... I you have any suggestion 
please say, currently im investigating the possibility of adding a 
header dependent on domain.. When I get a solution I can post it here, 
although off topic..


Michael Sparer wrote:

I triggered it in the doFilter method of a filter, however you surely know
how to get the request from inside a wicket component ;-)

For me, it went like that:

public void doFilter(final ServletRequest request, final ServletResponse
response, final FilterChain chain) throws IOException, ServletException {

final Request req = (Request) request;

final HttpFields fields = 
req.getConnection().getRequestFields();
final String hostField = fields.getStringField(Host); // that's the field


hope that helps

Michael



Nino.Martinez wrote:
  
Hi I have a vhost which has several serveraliases, how can I check for 
which one is being triggered?


Something like this:

if serveralias=myalias then{
   RequestHeadder add domain myalias
}

I've tried location, but it does not seem to be the thing..

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
Michael Sparer
http://talk-on-tech.blogspot.com
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



howto query which domain?

2008-06-23 Thread Nino Saturnino Martinez Vazquez Wael
Hi I have a vhost which has several serveraliases, how can I check for 
which one is being triggered?


Something like this:

if serveralias=myalias then{
  RequestHeadder add domain myalias
}

I've tried location, but it does not seem to be the thing..

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]