ChuckDeal wrote:
> I just built Wicket 1.3 from source this morning (possibly revision 504918?). 
> Actually, I built from source a couple of times over the past two weeks and
> each one had the same "problem".
> 
> I'm having a problem where sometimes my url gets rewritten as a relative
> that has a lot of "../" prefixed on it.
> 
> In a specific case, I have an AjaxLink that calls setResponsePage(Class,
> PageParameters) from the onClick() method that generates this url (captured
> from BookmarkablePageRequestTarget.respond(RequestCycle), line 219):
> Legacy/legacyUrl/%252Faims%252Freports%252FcatReports.jsp%253FlistName%253DaimsIssueTrackerReports%2526pageTitle%253DIssue%2BTracker%2BReports
> 
> That happens the first time I click it (which is the Home Page), which loads
> the page but screws up the <link> hrefs and <script> src as well as some
> image src attributes.  By screwed up, I mean that they are prefixed with
> "../../".  If I click this link from the context of another page (not the
> Home Page and even itself) this is the url that is generated (from the same
> line in BookmarkablePageRequestTarget):
> ../../../../../Legacy/legacyUrl/%252Faims%252Freports%252FcatReports.jsp%253FlistName%253DaimsIssueTrackerReports%2526pageTitle%253DIssue%2BTracker%2BReports
> 
> What is that all about?  I feel like I remember seeing a discussion or
> announcement by Al Maw about changing Wicket to use relative URLs, if this
> is true, perhaps this is a side effect of that change?  What am I missing? 
> Where should I start looking?

Hi Chuck,

It looks like you're trying to link to an external JSP, but that for 
some reason you're doing this via with a setResponsePage(), which is 
most definitely only for Wicket-based pages.

If you look at your URL, it has things like %252F in it. This is a 
doubly-URL-encoded version of "?".

It seems likely that this might actually be a URL escaping bug caused by 
you embedding your JSP paths in a Wicket page parameter on a mounted 
page URL, which is this one:
http://issues.apache.org/jira/browse/WICKET-40

A quick workaround for this may be to make your "Legacy" page not mounted.

Are you wrapping your old JSP pages inside a Wicket page using a 
RequestDispatcher? I might be able to give you some cunning advice on 
how to make all this work.

If you don't need to wrap a Wicket page around your JSPs, then you 
should probably be creating your links to them directly, rather than 
creating a Legacy.java Wicket page that takes JSP paths as a parameter.

Can you give me a bit more detail? Feel free to respond off-list, or 
open a JIRA issue and attach some code.

Best regards,

Al

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to