[ 
https://issues.apache.org/jira/browse/WICKET-3518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005608#comment-13005608
 ] 

Peter Ertl commented on WICKET-3518:
------------------------------------

^ This would mean you have multiple instances of wicket application. Should 
probably work though it's quite quick & dirty...

If you just need some kind of discriminator between different application types 
you should consider using subhosts in your domain name, e.g.

  app.mydomain.org 

and

  longapp.mydomain.org

These will have different wicket sessions since the session cookie uses the 
domain name for separation.

You can check the domain name in your app using the current request information.


> Multiple filter mappings in web.xml cause request.getUrl() to break
> -------------------------------------------------------------------
>
>                 Key: WICKET-3518
>                 URL: https://issues.apache.org/jira/browse/WICKET-3518
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC2
>         Environment: WebSphere 6.1
>            Reporter: Frans Stofberg
>            Assignee: Peter Ertl
>             Fix For: 1.5-RC3
>
>
> This issue is derived from WICKET-3497
> Here is the problem
> If I have two filter mappings in web.xml, only the 1st one gets loaded on the 
> servlet/filter startup. When calling request.getUrl() you get either an array 
> index out of bounds exception or part of the filter mapping in the url when 
> you access the app with the second mapping.
> here is an example
> 2 mappings
> /app/*
> /longapp/*
> when accessing with /app/ request.getUrl() works fine.
> when accessing with /longapp/ request.getUrl() will return gapp/ (it takes 
> the length of /app/ as the star for the substring)
> -------ServletWebRequest.getUrl()--------------
> ...
> final int start = request.getContextPath().length() + filterPrefix.length() + 
> 1;
> url.append(uri.substring(start));
> ...
> -------------------------------------------------------------
> filterPrefix was loaded on the startup of the filter, which in this case is 
> /app/ (this is can not be correct)
> you can see that if the mappings were reversed (/longapp/* before /app/*) in 
> web.xml the above code will throw an array/string index out of bounds 
> exception (and it does)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to