This also works... and now we don't have to set the previousPage to null.....
public static ReferrerRequest fromUri(final String uri, final Request request) { if (uri == null) { return null; } final String serverRegexp = "^.*://" + request.getServerName() + "(:" + request.getServerPort() + ")?" + request.getContextPath(); if (!uri.matches(serverRegexp + ".*$")) { return null; } final String path = uri.replaceFirst(serverRegexp, ""); int index = path.contains(";jsessionid") ? path.indexOf(";jsessionid") : path.length() - 1; return new ReferrerRequest(path.substring(0, index), request); } On Oct 28, 2011, at 12:43 PM, Joakim Olsson wrote: > Aaah...Sounds like an easy fix. Care to send a pull request at Github? > Since you have already solved the problem I mean. :-) > > /Joakim > > > 2011/10/28 Dávið Klein Sundsskarð <d...@amc.dk>: >> Hi, >> >> I have had the same issue with the Breadcrumb component. >> The problem is that the referrer contains a ";", which comes from >> tapestryRequest.getHeader("Referer") in the BreadCrumbDispatcher. >> decodePageRenderRequest doesn't like the ";" >> (componentEventLinkEncoder.decodePageRenderRequest(referrerRequest);) >> >> I just check the string for ; and set previousPage to null if is true. I've >> only experienced it to be true after the login page which is never part of >> the breadcrumb. >> Not the prettiest workaround but it works... >> We use Jetty so it isn't a Tomcat issue per se. >> >> /david >> >> -----Original Message----- >> From: Leon Derks [mailto:leon.de...@aurumeurope.com] >> Sent: 28. oktober 2011 12:29 >> To: Tapestry users >> Subject: Re: Input string >> 'login;jsessionid=082793EE9A197CEB7F7750090DD0423D' is not valid; the >> character ';' at position 6 is not valid. >> >> Hello Joakim, >> >> That would be great!! >> >> regards, >> Leon >> >> On Oct 28, 2011, at 12:23 PM, Joakim Olsson wrote: >> >>> Hi, >>> >>> Being the author of the breadcrumb component, I can confirm that I >>> have seen that from time to time as well. I can try to find out if >>> there is something that I can do about it or if it has it's roots >>> deeper into the Tapestry code. >>> >>> Regards, >>> Joakim >>> >>> >>> On Fri, Oct 28, 2011 at 11:04 AM, Leon Derks <leon.de...@aurumeurope.com> >>> wrote: >>>> Hello >>>> >>>> Thank you all for your great support! >>>> >>>> I am using Tapestry 5.2.6. >>>> >>>> I just found out something what causes this issue. >>>> >>>> I use a breadcrumb component with a BreadCrumbDispatcher see >>>> https://github.com/argoyle/tapestry-breadcrumbs >>>> >>>> When I don't use this breadcrumb mechanism, everything works fine. >>>> >>>> When I use this component, I get the error only after I have cleared my >>>> web history (cache, cookie etc) and I guess also when my session has >>>> expired. >>>> >>>> Does somebody now understand what might be the cause and how I can fix >>>> this? >>>> >>>> regards, >>>> Leon >>>> >>>> >>>> On Oct 28, 2011, at 10:36 AM, Steve Eynon wrote: >>>> >>>>> On what version of T5 are you using and under what circumstances exactly? >>>>> >>>>> For on T5.2.6 I can't generate the error with PageLinks or EventLinks. >>>>> >>>>> Steve. >>>>> >>>>> >>>>> >>>>> On 28 October 2011 16:24, Christian Riedel <cr.ml...@googlemail.com> >>>>> wrote: >>>>>> I see the same exception in log files for years now. Last thing I >>>>>> remember is that it happened in T5.1 apps already. It's definitely >>>>>> something that tapestry does not always ignore. >>>>>> I'd say, Leon, you should create a JIRA for this! >>>>>> >>>>>> >>>>>> Am 28.10.2011 um 04:49 schrieb Steve Eynon: >>>>>> >>>>>>> jsessionid's are unique id's created by the web-server (i.e. jetty >>>>>>> or >>>>>>> tomcat) when it first creates a session for a client. (In your >>>>>>> case, after you login.) It is usually stored in a cookie but it is >>>>>>> also equally valid to have them stored as part of refering URLs. >>>>>>> (As you are seeing) Often this is only done for the first request >>>>>>> / response cycle until your cookie is created. >>>>>>> >>>>>>> Anyhow, the jsessionid is nothing to do with T5, T5 just has to >>>>>>> happily ignore it - which (after a quick check on my sites) it >>>>>>> does for T5.1 and T5.3 so I'm not sure where your error is coming from. >>>>>>> >>>>>>> Steve. >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 28 October 2011 04:43, Muhammad Gelbana <m.gelb...@gmail.com> wrote: >>>>>>>> Please specify the exact scenario to reproduce this issue and >>>>>>>> state the version you are using >>>>>>>> >>>>>>>> On Thu, Oct 27, 2011 at 12:17 PM, Leon Derks >>>>>>>> <leon.de...@aurumeurope.com>wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> Hello >>>>>>>>> >>>>>>>>> I see this error message a lot. Almost always after my first >>>>>>>>> login attempt... >>>>>>>>> >>>>>>>>> What is causing this error? >>>>>>>>> >>>>>>>>> Input string 'login;jsessionid=082793EE9A197CEB7F7750090DD0423D' >>>>>>>>> is not valid; the character ';' at position 6 is not valid. >>>>>>>>> >>>>>>>>> regards, >>>>>>>>> Leon >>>>>>>>> ---------------------------------------------------------------- >>>>>>>>> ----- To unsubscribe, e-mail: >>>>>>>>> users-unsubscr...@tapestry.apache.org >>>>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> *Regards,* >>>>>>>> *Muhammad Gelbana >>>>>>>> Java Developer* >>>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------ >>>>>>> --- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------- >>>>>> -- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>>> >>>>>> >>>>> >>>>> -------------------------------------------------------------------- >>>>> - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>> >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >