You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Leangen <wi...@leangen.net> on 2008/06/26 02:22:19 UTC

Must I settle for bookmarkable pages?

My wicket app is mounted on "/" (for various reasons). However, my
server is behind a proxy, which means that from the outside, I can only
view pages that have a certain path (also desired behaviour for various
reasons).

Problem: when submitting a form, the URL shows up as something like:

   http://localhost:8080/?wicket:interface=:0:1:::

This works behind the firewall, but will not work from outside.


Is my only solution to use bookmarkable pages (with all the implications
of parsing parameters manually)?


Thanks!
David



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


Re: Must I settle for bookmarkable pages?

Posted by David Leangen <wi...@leangen.net>.
On Wed, 2008-06-25 at 23:08 -0700, Igor Vaynberg wrote:
> i dont know, i might got the multi-wicket-app in the same webapp way,
> just like wicket-examples.
> 
> that way you dont have any of these goofy issues. every bundle
> provides its own application instance and registers its own url slice.


Yes, you may be right. I'll find out soon enough, I guess.

I'll see if I can get this form stuff working without too much
difficulty and if there aren't any other goofy issues, like you say.

Otherwise, I may just switch back to how it was: each bundle with its
own wicket instance mounted on some path. The only problem with that is
that in my system, I want pages to be able to communicate with each
other, which IIUC won't work if they are not sitting in the same
instance.

Some of the concepts are still not very clear in my head, so I need to
do some more experimenting.


Anyway, thanks as always for the help. :-)


Cheers,
David



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


Re: Must I settle for bookmarkable pages?

Posted by Igor Vaynberg <ig...@gmail.com>.
i dont know, i might got the multi-wicket-app in the same webapp way,
just like wicket-examples.

that way you dont have any of these goofy issues. every bundle
provides its own application instance and registers its own url slice.

-igor

On Wed, Jun 25, 2008 at 10:59 PM, David Leangen <wi...@leangen.net> wrote:
>
>> > The thing is that I'm in an OSGi environment, and I have
>> > a WicketService that provides my Wicket instance. I attach
>> > "Applications" as bundles to the Wicket instance and "mount"
>> > them on a certain path.
>>
>>
>> so why are the /?wicket:interface urls interfering with that?
>
> He he... that goes back to the proxy issue. For what I'm doing, it's
> important that the single Wicket instance be mounted on "/", which means
> that "top" pages become inaccessible from outside of the firewall.
>
> The only way all this will work for me is if the url becomes something
> like /app/?wicket:interface, (or even
> better /app/pageName?wicket:interface) where "app" is the "mount
> point" (not in the pure Wicket sense) of the Application bundle I attach
> to the Wicket instance.
>
> This way:
>  - only one wicket instance mounted on "/"
>  - have a path accessible via proxying
>  - can determine the Application bundle based on the URL path
>
> Cheers,
> David
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


RE: Must I settle for bookmarkable pages?

Posted by David Leangen <wi...@leangen.net>.
> > He he... that goes back to the proxy issue. For what I'm doing, it's
> > important that the single Wicket instance be mounted on "/", which means
> > that "top" pages become inaccessible from outside of the firewall.
> >
>
> If you're using Apache to reverse proxy, it's possible to do this
> by having it look for url parameters.

Hmmm...

This is really nice. Thanks!

Probably better than playing around with webrequeststrategy...



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


Re: Must I settle for bookmarkable pages?

Posted by n8han <na...@technically.us>.

David Leangen-8 wrote:
> 
> He he... that goes back to the proxy issue. For what I'm doing, it's
> important that the single Wicket instance be mounted on "/", which means
> that "top" pages become inaccessible from outside of the firewall.
> 

If you're using Apache to reverse proxy, it's possible to do this by having
it look for url parameters.

        RewriteCond %{QUERY_STRING} ^(addComment|wicket|random)
        RewriteRule ^/$ ajp://localhost:9000/ [P]

You just keep adding ProxyPass conditions, and this case a RewriteRule,
until everything that should go to Wicket is covered (and everything else is
served normally).

Nathan
-- 
View this message in context: http://www.nabble.com/Must-I-settle-for-bookmarkable-pages--tp18124374p18132711.html
Sent from the Wicket - User 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: Must I settle for bookmarkable pages?

Posted by David Leangen <wi...@leangen.net>.
> > The thing is that I'm in an OSGi environment, and I have 
> > a WicketService that provides my Wicket instance. I attach
> > "Applications" as bundles to the Wicket instance and "mount" 
> > them on a certain path.
> 
> 
> so why are the /?wicket:interface urls interfering with that?

He he... that goes back to the proxy issue. For what I'm doing, it's
important that the single Wicket instance be mounted on "/", which means
that "top" pages become inaccessible from outside of the firewall.

The only way all this will work for me is if the url becomes something
like /app/?wicket:interface, (or even
better /app/pageName?wicket:interface) where "app" is the "mount
point" (not in the pure Wicket sense) of the Application bundle I attach
to the Wicket instance.

This way:
 - only one wicket instance mounted on "/"
 - have a path accessible via proxying
 - can determine the Application bundle based on the URL path

Cheers,
David




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


Re: Must I settle for bookmarkable pages?

Posted by Igor Vaynberg <ig...@gmail.com>.
so why are the /?wicket:interface urls interfering with that?

-igor

On Wed, Jun 25, 2008 at 8:27 PM, David Leangen <wi...@leangen.net> wrote:
>
>> you can roll your own webrequest coding strategy. But then you are on your own.
>
> Cool. Thanks!
>
>> The problem here is that you map wicket to a  URL space but then don't
>> want it to use that space...doesn't make sense to me.
>
> The thing is that I'm in an OSGi environment, and I have a WicketService
> that provides my Wicket instance. I attach "Applications" as bundles to
> the Wicket instance and "mount" them on a certain path.
>
> It would be possible to create a new Wicket instance for each
> Application bundle, but that's not really the ideal way to work. Rather,
> I'm trying to have one single Wicket instance that can "host" my various
> Application bundles.
>
> Generally, this is working fine, except for this form bump I hit along
> the way. If I can get this part working, then it seems that the setup
> should be working almost exactly as I'd hoped.
>
>
> Cheers,
> David
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Must I settle for bookmarkable pages?

Posted by David Leangen <wi...@leangen.net>.
> you can roll your own webrequest coding strategy. But then you are on your own.

Cool. Thanks!

> The problem here is that you map wicket to a  URL space but then don't
> want it to use that space...doesn't make sense to me.

The thing is that I'm in an OSGi environment, and I have a WicketService
that provides my Wicket instance. I attach "Applications" as bundles to
the Wicket instance and "mount" them on a certain path.

It would be possible to create a new Wicket instance for each
Application bundle, but that's not really the ideal way to work. Rather,
I'm trying to have one single Wicket instance that can "host" my various
Application bundles.

Generally, this is working fine, except for this form bump I hit along
the way. If I can get this part working, then it seems that the setup
should be working almost exactly as I'd hoped.


Cheers,
David




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


Re: Must I settle for bookmarkable pages?

Posted by ig...@gmail.com.
you can roll your own webrequest coding strategy. But then you are on your own.

The problem here is that you map wicket to a  URL space but then don't
want it to use that space...doesn't make sense to me.

-igor

On 6/25/08, David Leangen <wi...@leangen.net> wrote:
>
> Hey, Igor,
>
>> > Problem: when submitting a form, the URL shows up as something like:
>> >
>> >   http://localhost:8080/?wicket:interface=:0:1:::
>> >
>> > This works behind the firewall, but will not work from outside.
>> >
>> >
>> > Is my only solution to use bookmarkable pages (with all the implications
>> > of parsing parameters manually)?
>
>> solution is to either fix the firewall or use a /foo/* mapping
>
> Well, that would be difficult for various reasons. I assume you mean
> a /foo/* mapping for the servlet filter, right?
>
> So, you are saying that the only possible solutions are:
>
> 1. Allow proxying on null path (not possible for me)
>
> 2. Change the wicket instance mapping to /foo/* from /*
>      (possible, but not what I want)
>
> 3. Use bookmarkable pages with all the trouble of parsing
>      (want to avoid if possible)
>
>
> And there are no other possible solutions? Or is there something
> somewhere I can fiddle with so I can change the way the URL is rendered
> for the form, in the spirit of MixedURLParamCodingStrategy or something?
>
>
> Cheers,
> David
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Must I settle for bookmarkable pages?

Posted by David Leangen <wi...@leangen.net>.
Hey, Igor,

> > Problem: when submitting a form, the URL shows up as something like:
> >
> >   http://localhost:8080/?wicket:interface=:0:1:::
> >
> > This works behind the firewall, but will not work from outside.
> >
> >
> > Is my only solution to use bookmarkable pages (with all the implications
> > of parsing parameters manually)?

> solution is to either fix the firewall or use a /foo/* mapping

Well, that would be difficult for various reasons. I assume you mean
a /foo/* mapping for the servlet filter, right?

So, you are saying that the only possible solutions are:

1. Allow proxying on null path (not possible for me)

2. Change the wicket instance mapping to /foo/* from /*
     (possible, but not what I want)

3. Use bookmarkable pages with all the trouble of parsing
     (want to avoid if possible)


And there are no other possible solutions? Or is there something
somewhere I can fiddle with so I can change the way the URL is rendered
for the form, in the spirit of MixedURLParamCodingStrategy or something?


Cheers,
David



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


Re: Must I settle for bookmarkable pages?

Posted by Igor Vaynberg <ig...@gmail.com>.
solution is to either fix the firewall or use a /foo/* mapping

-igor

On Wed, Jun 25, 2008 at 5:22 PM, David Leangen <wi...@leangen.net> wrote:
>
> My wicket app is mounted on "/" (for various reasons). However, my
> server is behind a proxy, which means that from the outside, I can only
> view pages that have a certain path (also desired behaviour for various
> reasons).
>
> Problem: when submitting a form, the URL shows up as something like:
>
>   http://localhost:8080/?wicket:interface=:0:1:::
>
> This works behind the firewall, but will not work from outside.
>
>
> Is my only solution to use bookmarkable pages (with all the implications
> of parsing parameters manually)?
>
>
> Thanks!
> David
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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