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

Chris Colman commented on WICKET-2912:
--------------------------------------

I switched over to using a filter based redirector instead of relying on the 
'welcome-file-list' mechanism to detect a domain name with no path/file suffix 
and everything works fine again - without needing the patch to PageMap.java

I guess the use of the 'welcome-file-list' to detect a request from just a 
[sub]domain name without any path/file/query specified was really just a short 
cut/hack that I should have avoided and achieved with a proper filter like I 
have now.

So I guess we should mark this issue as 'not a bug' until someone really needs 
to do what I was doing - but that's probably unlikely.

> IE 8 gets 404 error after continueToOriginalDestination() when app is at root 
> context
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2912
>                 URL: https://issues.apache.org/jira/browse/WICKET-2912
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.9
>         Environment: Occurs on both Windows and Linux
> Running Tomcat 6
> JDK 1.6
>            Reporter: Chris Colman
>             Fix For: 1.4.13, 1.5-M3
>
>         Attachments: myproject.rar
>
>
> After recommendation we recently switched wicket app from /content to / 
> (root) context. App was working fine before but after switching to root 
> context calls to continueToOriginalDestination give 404 errors in IE but 
> continues to work perfectly in FireFox and Opera.
> Patch to fix the problem:
> I have provided a fix to PageMap's continueToOriginalDestination that fixes 
> the problem on IE and continues to work fine on FireFox and Opera for all the 
> tests I could throw at it.
> This patch breaks some unit tests - probably tests that the redirect occurs 
> on the exact interceptContinuationURL that was originally provided, naturally 
> after stripping off the leading '/' these would no longer work.
> This fix may cause problems when the web app is NOT in the root context but 
> I'm not sure - they may be fine with this.
>       public final boolean continueToOriginalDestination()
>       {
>               // Get request cycle
>               final RequestCycle cycle = RequestCycle.get();
>               // If there's a place to go to
>               if (interceptContinuationURL != null)
>               {
> >> ADDED                      if ( interceptContinuationURL.length() > 0 && 
> >> interceptContinuationURL.charAt(0) == '/' )
> >> ADDED                              interceptContinuationURL = 
> >> interceptContinuationURL.substring(1);       
>                       cycle.setRequestTarget(new
> RedirectRequestTarget(interceptContinuationURL));
>                       // Reset interception URL
>                       interceptContinuationURL = null;
>                       // Force session to replicate page maps
>                       dirty();
>                       return true;
>               }
>               return false;
>       }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to