You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by fstof <fr...@gmail.com> on 2011/03/02 12:38:34 UTC
Wicket 1.5 migration Issue
Hi all,
I decided to do the migration from 1.4.15 to 1.5rc2
Some background on how we do stuff:
In web.xml we have the WicketServlet configured with multiple servlet
mappings, eg
wicket.servlet
/skinwithlongname/*
wicket.servlet
/shortskin/*
Now these mappings are used to specify which style to set on the session
like this:
[Session Constructor]
...
String u = request.getUrl().toString(); // should resolve to
/servletMapping/mountedPage/.... according to wicket 1.4)
String skin = u.substring(0, u.indexOf("/"));
setStyle(skin)
...
This no longer works
The issue comes in the request.getUrl().
I traced it all the way back to WicketFilter.init(). In there the filterPath
gets resolved, in my opinion this is not correct, as I havent even hit a
request. So init() only loads the first mapping in the web.xml
(/skinwithlongname).
Now when I enter a page thru the mapping /shortskin and the Session gets
created, request.getUrl() breaks (String index out of range)
I hope I'm making sence here. But essencially request.getUrl() is not
working correctly
Thanks
Frans
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-migration-Issue-tp3331365p3331365.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: Wicket 1.5 migration Issue
Posted by Martin Grigorov <mg...@apache.org>.
please create a quickstart application and attach it to a ticket in jira.
thanks!
On Wed, Mar 2, 2011 at 1:38 PM, fstof <fr...@gmail.com> wrote:
> Hi all,
> I decided to do the migration from 1.4.15 to 1.5rc2
>
> Some background on how we do stuff:
>
> In web.xml we have the WicketServlet configured with multiple servlet
> mappings, eg
>
>
> wicket.servlet
> /skinwithlongname/*
>
>
> wicket.servlet
> /shortskin/*
>
>
> Now these mappings are used to specify which style to set on the session
> like this:
> [Session Constructor]
> ...
> String u = request.getUrl().toString(); // should resolve to
> /servletMapping/mountedPage/.... according to wicket 1.4)
> String skin = u.substring(0, u.indexOf("/"));
> setStyle(skin)
> ...
>
> This no longer works
> The issue comes in the request.getUrl().
> I traced it all the way back to WicketFilter.init(). In there the
> filterPath
> gets resolved, in my opinion this is not correct, as I havent even hit a
> request. So init() only loads the first mapping in the web.xml
> (/skinwithlongname).
> Now when I enter a page thru the mapping /shortskin and the Session gets
> created, request.getUrl() breaks (String index out of range)
>
> I hope I'm making sence here. But essencially request.getUrl() is not
> working correctly
>
> Thanks
> Frans
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-migration-Issue-tp3331365p3331365.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
>
>