You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Simon B <si...@gmail.com> on 2014/03/12 11:44:16 UTC

testing subdomain page

Hi, 
Following on from my previous question: 

http://apache-wicket.1842946.n4.nabble.com/mounting-mapping-subdomain-HomePage-tp4664880.html

I now want to test the page using the following:



The web app is set up to redirect if it sees that a request has been made
from a subdomain or domain that is *not*

foo.myapp.com 
or 
foo.localhost:8080

Because of this redirect  the above test fails.

When I look at the host of the url in the request during the test, with a
call to:



it returns "localhost".

How can I set the host for urls // requests in WicketTester to
"foo.localhost"

Cheers

Simon

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/testing-subdomain-page-tp4664912.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: testing subdomain page

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Wed, Mar 12, 2014 at 3:06 PM, Simon B <si...@gmail.com> wrote:

> Hi Martin,
>
> Thanks for your reply, I've tried that and it works fine.
>
> I was hoping for a way that would fit more simply into my existing tests.
>
> Incidentally what is the best way for me to include code snippets, I use
> the
> nabble web interface, but I note that in your reply you didn't get any of
> the code that included in "raw" tags.
>

Yes, posts from Nabble come with stripped code snippets.
Fortunately these posts have a link to the nabble web UI so we can see the
code there.
I think the best would be if pastebin services are used for code snippets
because with the syntax coloring it is much easier to read than a big chunk
of raw text.


>
> Cheers
>
> Simon
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/testing-subdomain-page-tp4664912p4664916.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: testing subdomain page

Posted by Simon B <si...@gmail.com>.
Hi Martin, 

Thanks for your reply, I've tried that and it works fine.

I was hoping for a way that would fit more simply into my existing tests.

Incidentally what is the best way for me to include code snippets, I use the
nabble web interface, but I note that in your reply you didn't get any of
the code that included in "raw" tags.

Cheers

Simon 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/testing-subdomain-page-tp4664912p4664916.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: testing subdomain page

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Try with tester.executeUrl(Url.parse("http://foo.localhost:8080"))

Martin Grigorov
Wicket Training and Consulting


On Wed, Mar 12, 2014 at 12:44 PM, Simon B <si...@gmail.com> wrote:

> Hi,
> Following on from my previous question:
>
>
> http://apache-wicket.1842946.n4.nabble.com/mounting-mapping-subdomain-HomePage-tp4664880.html
>
> I now want to test the page using the following:
>
>
>
> The web app is set up to redirect if it sees that a request has been made
> from a subdomain or domain that is *not*
>
> foo.myapp.com
> or
> foo.localhost:8080
>
> Because of this redirect  the above test fails.
>
> When I look at the host of the url in the request during the test, with a
> call to:
>
>
>
> it returns "localhost".
>
> How can I set the host for urls // requests in WicketTester to
> "foo.localhost"
>
> Cheers
>
> Simon
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/testing-subdomain-page-tp4664912.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>