Re: Wicket 1.5 & URLs

2013-07-29 Thread Eric Gulatee
Martin,

Thank you, I got the basics working with Jetty & Wicket Filters.
 LocaleFirstMapper was a better starting point instead of
PageInstanceMapper.

Cheers,
Eric Gulatee



On Tue, Jul 23, 2013 at 3:42 AM, Martin Grigorov wrote:

> Hi,
>
> I think the cleanest approach is to create your own IRequestMapper and set
> it as root mapper.
> See
>
> https://cwiki.apache.org/confluence/display/WICKET/Request+mapping#Requestmapping-CryptoMapper
> and
> HttpsMapper to understand what root mapper is.
> Also see
>
> https://github.com/apache/wicket/blob/master/wicket-examples/src/main/java/org/apache/wicket/examples/requestmapper/LocaleFirstMapper.java?source=cc
> to
> get the idea. You should prepend a segment for all secured pages.
>
>
> On Mon, Jul 22, 2013 at 6:39 PM, Eric Gulatee  >wrote:
>
> > Hi fellow Wicketeers,
> >
> > We are in the process of upgrading a 1.4.X application to 1.5.X
> >
> > We had 2 different URL 'contexts' within the same Wicket 1.4 Application.
> >
> > /protected/*
> >   All pages annotated with security.  [In order to use J2EE security,
> LTPA,
> > Kerberos etc]
> > /*
> >   All unprotected pages
> >
> > Moving to Wicket 1.5 I would like to obtain the following URL schemes
> based
> > on either an annotation on the class OR extending an interface..
> > Protected Pages:
> > /protected/wicket/page?1
> > Unprotected Pages:
> > /wicket/page?1
> >
> > 1-  I have explored the mountedmapper but I don't want to specify each &
> > every class, nor do I want bookmarkable URLs.
> >
> > 2-  I am currentl exploring creating a version of pageinstancemapped
> > prepending /protected which actually generates nice urls.
> > However, I am currently getting a page expired.  (I am still trying to
> dig
> > through the cause etc)
> >
> > My question:
> > Is there a different recommended way to generate these "custom" URLs in a
> > generic way much like PageInstanceMapper based on either an annotation
> on a
> > class or interface the class would implement OR am I going down the right
> > path with extending PageInstanceMapper?
> >
> > Cheers,
> > Eric Gulatee
> >
>


Re: Wicket 1.5 & URLs

2013-07-23 Thread Martin Grigorov
Hi,

I think the cleanest approach is to create your own IRequestMapper and set
it as root mapper.
See
https://cwiki.apache.org/confluence/display/WICKET/Request+mapping#Requestmapping-CryptoMapper
and
HttpsMapper to understand what root mapper is.
Also see
https://github.com/apache/wicket/blob/master/wicket-examples/src/main/java/org/apache/wicket/examples/requestmapper/LocaleFirstMapper.java?source=cc
to
get the idea. You should prepend a segment for all secured pages.


On Mon, Jul 22, 2013 at 6:39 PM, Eric Gulatee wrote:

> Hi fellow Wicketeers,
>
> We are in the process of upgrading a 1.4.X application to 1.5.X
>
> We had 2 different URL 'contexts' within the same Wicket 1.4 Application.
>
> /protected/*
>   All pages annotated with security.  [In order to use J2EE security, LTPA,
> Kerberos etc]
> /*
>   All unprotected pages
>
> Moving to Wicket 1.5 I would like to obtain the following URL schemes based
> on either an annotation on the class OR extending an interface..
> Protected Pages:
> /protected/wicket/page?1
> Unprotected Pages:
> /wicket/page?1
>
> 1-  I have explored the mountedmapper but I don't want to specify each &
> every class, nor do I want bookmarkable URLs.
>
> 2-  I am currentl exploring creating a version of pageinstancemapped
> prepending /protected which actually generates nice urls.
> However, I am currently getting a page expired.  (I am still trying to dig
> through the cause etc)
>
> My question:
> Is there a different recommended way to generate these "custom" URLs in a
> generic way much like PageInstanceMapper based on either an annotation on a
> class or interface the class would implement OR am I going down the right
> path with extending PageInstanceMapper?
>
> Cheers,
> Eric Gulatee
>


Re: Wicket 1.5 & URLs

2013-07-22 Thread Eric Gulatee
Some more details,

Using a quickstart, If I replace the pageinstancemapper by a
custompageinstancemapper which does nothing else than extending
pageinstancemapper, I am getting pageexpiredpages.

This matches the kind of behavior I get when I add a second
pageinstancemapper mapping to another context root and seemingly correctly
determine it should be used to match the urls.
ie: /contextroot/wicket/page?33

Is there any reason I can't replicate the pageinstancemapper by my own?
 And if so, why do I get pageexpired problems?

Cheers,
Eric Gulatee






On Mon, Jul 22, 2013 at 11:39 AM, Eric Gulatee wrote:

> Hi fellow Wicketeers,
>
> We are in the process of upgrading a 1.4.X application to 1.5.X
>
> We had 2 different URL 'contexts' within the same Wicket 1.4 Application.
>
> /protected/*
>   All pages annotated with security.  [In order to use J2EE security,
> LTPA, Kerberos etc]
> /*
>   All unprotected pages
>
> Moving to Wicket 1.5 I would like to obtain the following URL schemes
> based on either an annotation on the class OR extending an interface..
> Protected Pages:
> /protected/wicket/page?1
> Unprotected Pages:
> /wicket/page?1
>
> 1-  I have explored the mountedmapper but I don't want to specify each &
> every class, nor do I want bookmarkable URLs.
>
> 2-  I am currentl exploring creating a version of pageinstancemapped
> prepending /protected which actually generates nice urls.
> However, I am currently getting a page expired.  (I am still trying to dig
> through the cause etc)
>
> My question:
> Is there a different recommended way to generate these "custom" URLs in a
> generic way much like PageInstanceMapper based on either an annotation on a
> class or interface the class would implement OR am I going down the right
> path with extending PageInstanceMapper?
>
> Cheers,
> Eric Gulatee
>
>
>
>
>


Wicket 1.5 & URLs

2013-07-22 Thread Eric Gulatee
Hi fellow Wicketeers,

We are in the process of upgrading a 1.4.X application to 1.5.X

We had 2 different URL 'contexts' within the same Wicket 1.4 Application.

/protected/*
  All pages annotated with security.  [In order to use J2EE security, LTPA,
Kerberos etc]
/*
  All unprotected pages

Moving to Wicket 1.5 I would like to obtain the following URL schemes based
on either an annotation on the class OR extending an interface..
Protected Pages:
/protected/wicket/page?1
Unprotected Pages:
/wicket/page?1

1-  I have explored the mountedmapper but I don't want to specify each &
every class, nor do I want bookmarkable URLs.

2-  I am currentl exploring creating a version of pageinstancemapped
prepending /protected which actually generates nice urls.
However, I am currently getting a page expired.  (I am still trying to dig
through the cause etc)

My question:
Is there a different recommended way to generate these "custom" URLs in a
generic way much like PageInstanceMapper based on either an annotation on a
class or interface the class would implement OR am I going down the right
path with extending PageInstanceMapper?

Cheers,
Eric Gulatee