Re: Parsing company id from url

2012-12-27 Thread jchappelle
Sebastian,

That makes a lot of sense. I think I like that solution better because it
seems simpler and more intuitive. I may write a ServletFilter that does the
app lookup part and store it in the session.

Thanks a lot!

Josh



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Parsing-company-id-from-url-tp4655029p4655086.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Parsing company id from url

2012-12-24 Thread Bas Gooren

Josh,

We run the same kind of app, and what we did is simply consume the 
X-Forwarded-Host in the app server (see 
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers).


That way the url - website ID lookup is handled in the app itself.

We have an IP especially for this app, and have set up a catch-all 
virtual host on apache (reverse proxy) which forwards all traffic to our 
wicket app.


Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 23-12-2012 23:34, schreef Sven Meier:

Hi Josh,

LocaleFirstMapper from wicket-examples seems like something you're 
looking for, it reads the locale from the first url segment.


Sven

On 12/23/2012 10:33 PM, jchappelle wrote:
I'm hoping this will be an easy question to answer for the wicket 
gurus out

there.

I'm developing an app that will have pages specific to companies. 
They will
be able to configure styles and logos and all the pages will be 
branded for
their company. The root url looks like http://server/app. I'm going 
to have
an Apache web server proxy in front of it that looks like 
http://yourcompany

that will proxy to the backing tomcat instance.

My problem is that I'm not sure how to formulate a URL that wicket 
can use

to parse the institution id. I was thinking that I could proxy
http://company1 to http://server/app/1 and http://company2 to
http://server/app/2. I'm not sure if this is a best practice for this
situation but it seems reasonable.

*Question*
How do I parse this kind of parameter from within wicket? 
IRequestMapper?

*Note*
Some pages will be secured requiring the user to log in, and other pages
will be publicly accessible.

Thanks for your time.

Josh





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Parsing-company-id-from-url-tp4655029.html

Sent from the Users forum mailing list archive at Nabble.com.

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




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





RE: Parsing company id from url

2012-12-24 Thread Chris Colman
Josh,

We run the same kind of app, and what we did is simply consume the
X-Forwarded-Host in the app server (see
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers).

That way the url - website ID lookup is handled in the app itself.

We have an IP especially for this app, and have set up a catch-all
virtual host on apache (reverse proxy) which forwards all traffic to
our
wicket app.

Sounds very similar to the way we handle it - a catch all virtual host
and the wicket app handles all traffic.

Some of our clients have their own domain name and some don't so we
allocate them a subdomain based on their company name (minus all spaces
and punctuation of course).


Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 23-12-2012 23:34, schreef Sven Meier:
 Hi Josh,

 LocaleFirstMapper from wicket-examples seems like something you're
 looking for, it reads the locale from the first url segment.

 Sven

 On 12/23/2012 10:33 PM, jchappelle wrote:
 I'm hoping this will be an easy question to answer for the wicket
 gurus out
 there.

 I'm developing an app that will have pages specific to companies.
 They will
 be able to configure styles and logos and all the pages will be
 branded for
 their company. The root url looks like http://server/app. I'm going
 to have
 an Apache web server proxy in front of it that looks like
 http://yourcompany
 that will proxy to the backing tomcat instance.

 My problem is that I'm not sure how to formulate a URL that wicket
 can use
 to parse the institution id. I was thinking that I could proxy
 http://company1 to http://server/app/1 and http://company2 to
 http://server/app/2. I'm not sure if this is a best practice for
this
 situation but it seems reasonable.

 *Question*
 How do I parse this kind of parameter from within wicket?
 IRequestMapper?
 *Note*
 Some pages will be secured requiring the user to log in, and other
pages
 will be publicly accessible.

 Thanks for your time.

 Josh





 --
 View this message in context:

http://apache-wicket.1842946.n4.nabble.com/Parsing-company-id-from-url-
tp4655029.html
 Sent from the Users forum mailing list archive at Nabble.com.


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



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



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



Re: Parsing company id from url

2012-12-23 Thread Sven Meier

Hi Josh,

LocaleFirstMapper from wicket-examples seems like something you're 
looking for, it reads the locale from the first url segment.


Sven

On 12/23/2012 10:33 PM, jchappelle wrote:

I'm hoping this will be an easy question to answer for the wicket gurus out
there.

I'm developing an app that will have pages specific to companies. They will
be able to configure styles and logos and all the pages will be branded for
their company. The root url looks like http://server/app. I'm going to have
an Apache web server proxy in front of it that looks like http://yourcompany
that will proxy to the backing tomcat instance.

My problem is that I'm not sure how to formulate a URL that wicket can use
to parse the institution id. I was thinking that I could proxy
http://company1 to http://server/app/1 and http://company2 to
http://server/app/2. I'm not sure if this is a best practice for this
situation but it seems reasonable.

*Question*
How do I parse this kind of parameter from within wicket? IRequestMapper?
*Note*
Some pages will be secured requiring the user to log in, and other pages
will be publicly accessible.

Thanks for your time.

Josh





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Parsing-company-id-from-url-tp4655029.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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