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]

Reply via email to