We are using version 1.2.4
Johan Compagner wrote: > > what wicket version are you exactly using? > > > On 2/17/07, beboris <[EMAIL PROTECTED]> wrote: >> >> >> So, here is an update. >> >> It DID fix the problem for the home page. >> >> Still, we have a bunch of "relative path" resources on other pages, which >> are not retrieved correctly, including some icons. >> >> Here is the scenario [data are straight from my debugger] >> >> ========================= >> It all started with the relative path, of course... >> <wicket:panel> >> <div class="search_div1_left_menu"> >> <form wicket:id="searchForm" onsubmit="return false;"> >> <div class="search_div1_left_option"> >> # >> img/arrow_search.gif >> >> <span class="text_style"> >> <wicket:message key="searchOptions"/> >> </span> >> </div> >> >> And ended with the following stack trace, with the >> [org.apache.naming.resources.ProxyDirContext.]cacheLoad() failing to load >> the file and throwing NamingException exception for my >> "img/arrow_search.gif" >> >> Thread [http-18080-Processor22] (Suspended) >> ProxyDirContext.cacheLoad(CacheEntry) line: 1533 >> ProxyDirContext.cacheLookup(String) line: 1448 >> ProxyDirContext.lookup(String) line: 282 >> ApplicationContext.getResourceAsStream(String) line: 531 >> ApplicationContextFacade.getResourceAsStream(String) line: 184 >> WebExternalResourceRequestTarget.respond(RequestCycle) line: 85 >> DefaultResponseStrategy.respond(RequestCycle) line: 49 >> >> >> DefaultWebRequestCycleProcessor(AbstractCompoundRequestCycleProcessor).respond(RequestCycle) >> line: 66 >> >> >> WebRequestCycle(RequestCycle).doProcessEventsAndRespond(IRequestCycleProcessor) >> line: 902 >> WebRequestCycle(RequestCycle).processEventsAndRespond() line: 934 >> WebRequestCycle(RequestCycle).step() line: 1010 >> WebRequestCycle(RequestCycle).steps() line: 1084 >> WebRequestCycle(RequestCycle).request() line: 454 >> WicketServlet.doGet(HttpServletRequest, HttpServletResponse) line: 219 >> WicketServlet(HttpServlet).service(HttpServletRequest, >> HttpServletResponse) >> line: 689 >> WicketServlet(HttpServlet).service(ServletRequest, ServletResponse) line: >> 802 >> ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) >> line: 252 >> ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: >> 173 >> StandardWrapperValve.invoke(Request, Response) line: 213 >> StandardContextValve.invoke(Request, Response) line: 178 >> StandardHostValve.invoke(Request, Response) line: 126 >> ErrorReportValve.invoke(Request, Response) line: 105 >> StandardEngineValve.invoke(Request, Response) line: 107 >> CoyoteAdapter.service(Request, Response) line: 148 >> Http11Processor.process(InputStream, OutputStream) line: 869 >> >> ========= >> >> protected void cacheLoad(CacheEntry entry) { >> String name = entry.name; >> // Retrieve missing info >> boolean exists = true; >> // Retrieving attributes >> if (entry.attributes == null) { >> try { >> Attributes attributes = >> dirContext.getAttributes(entry.name); >> if (!(attributes instanceof ResourceAttributes)) { >> entry.attributes = >> new ResourceAttributes(attributes); >> } else { >> entry.attributes = (ResourceAttributes) attributes; >> } >> } catch (NamingException e) { >> exists = false; >> } >> } >> >> FileDirContext claims it can't find the file with entry.name. And it's >> not >> surprising. Somehow, the name contains the "pictureBank", which is where >> servlet is mapped (Of course, the actual file path on the file system >> doesn't include the "/pictureBank"!!!) >> >> dirContext FileDirContext (id=8325) >> absoluteBase "C:\Dev\apache-tomcat-5.5.20\webapps\NEO-S" >> allowLinking false >> base File (id=10277) >> cached true >> cacheMaxSize 10240 >> cacheTTL 5000 >> caseSensitive true >> docBase "C:\Dev\apache-tomcat-5.5.20\webapps\NEO-S" >> env Hashtable<K,V> (id=10279) >> nameParser NameParserImpl (id=10280) >> sm StringManager (id=8333) >> >> entry CacheEntry (id=11850) >> accessCount 0 >> attributes null >> context null >> exists true >> name "/pictureBank/img/arrow_search.gif" >> resource null >> size 1 >> timestamp -1 >> >> ========= >> >> But down there in the stack trace I've got WicketServlet, showing me an >> expected pathTranslated for the request >> ("C:\Dev\apache-tomcat-5.5.20\webapps\NEO-S\img\arrow_search.gif"), which >> happens to be exactly the right name the file has on disk. >> >> [method = GET, protocol = HTTP/1.1, requestURL = >> http://192.168.2.93:18080/NEO-S/pictureBank/img/arrow_search.gif, >> contentType = null, contentLength = -1, contextPath = /NEO-S, pathInfo = >> /img/arrow_search.gif, requestURI = >> /NEO-S/pictureBank/img/arrow_search.gif, >> servletPath = /pictureBank, pathTranslated = >> C:\Dev\apache-tomcat-5.5.20\webapps\NEO-S\img\arrow_search.gif] >> >> There is no my code in the middle -just some wicked (oops! Sorry! Wicket) >> magic, and I have no wand... Anybody? >> >> Do you have any idea what could be causing this "change of heart"? Why >> WicketServlet correctly identified servletPath and pathTranslated >> (servletPath = /pictureBank, pathTranslated = >> C:\Dev\apache-tomcat-5.5.20\webapps\NEO-S\img\arrow_search.gif), but then >> (after the request went through WebExternalResourceRequestTarget) it was >> decided that the file path should include "/pictureBank" ??? >> >> Can it be something simple that we can do to cure this kind of issues? >> >> >> beboris wrote: >> > >> > Just an FYI for those who want to know what the problem was about or >> > solution for it is. We did mount the page, and it didn't help. So, we >> > created a sample and shared it with Igor. He filed a bug and created a >> > patch (see https://issues.apache.org/jira/browse/WICKET-290). I'll keep >> > you posted whether it fixed the problem for us... >> > >> > >> > igor.vaynberg wrote: >> >> >> >> mount the page using querystringcodingstrategy that way the link will >> be >> >> /index.html?wicket:pagemap... >> >> -igor >> >> >> >> >> >> On 2/15/07, beboris <[EMAIL PROTECTED]> wrote: >> >>> >> >>> >> >>> Nothing happens. We stay on the same HomePage and display an error. >> >>> Unfortunately, Wicket changes URL of the page though, so relative >> links >> >>> stop >> >>> working... (see a code snippet below, please) >> >>> >> >>> -bob >> >>> >> >>> HomePage extends WebPage >> >>> ... >> >>> LoginForm form = new Form() { >> >>> ... >> >>> @Override >> >>> public void onSubmit() { >> >>> ... // Login logic here. >> >>> if (ok) { >> >>> setResponsePage(new FNMyPhotosWebPage()); >> >>> } else { >> >>> error(""Log-in for [" + email + "] failed""); >> >>> ... >> >>> >> >>> >> >>> >> >>> igor.vaynberg wrote: >> >>> > >> >>> > what happens if there is an error? how does wicket redirect back to >> >>> that >> >>> > page? how is that back url generated? >> >>> > >> >>> > -igor >> >>> > >> >>> > >> >>> > >> >>> > On 2/15/07, beboris <[EMAIL PROTECTED]> wrote: >> >>> >> >> >>> >> >> >>> >> After 2 months of working with Wicket we almost felt like >> "profies" >> >>> but >> >>> >> now >> >>> >> that we have to [loosely] integrate some pieces written by others >> >>> we've >> >>> >> got >> >>> >> into one of those Wicket "gotchas" again... >> >>> >> >> >>> >> So, there is a simple home page with a simple javascript created >> by >> >>> >> others, >> >>> >> which we host inside our framework, but don't want to rewrite from >> >>> >> scratch... >> >>> >> >> >>> >> Let's say, this is a URL of that home page: >> >>> >> >> >>> http://mydomain.com/webappPath/wicketServletMappingPath/index.html >> >>> >> >> >>> >> The page contains DHTML which works with a bunch of relative URL-s >> of >> >>> >> images >> >>> >> that are downloaded by a javascript (js/home/myscript.js), such >> as: >> >>> >> var imgName = "../img/home/login.jpg"; >> >>> >> >> >>> >> And the page shows up just fine. >> >>> >> >> >>> >> All the page interaction with our (Wicket-based) site is limited >> to >> >>> one >> >>> >> simple login form that posts (via HTTP[S] POST) to our Wicket >> >>> >> implementation. If there is no error - everything works fine, and >> the >> >>> >> user >> >>> >> is redirected to an authenticated area. >> >>> >> >> >>> >> However, if there is an error, wicket returns back with a >> different >> >>> URL >> >>> >> !!! >> >>> >> >> >>> >> >> >>> >> >> >>> >> http://mydomain.com/webappPath/wicketServletMappingPath/index.html/wicket:pageMapName/wicket-0 >> >>> >> >> >>> >> That's it! Relative paths to resources don't work anymore... The >> >>> whole >> >>> >> page >> >>> >> stops working. >> >>> >> >> >>> >> There gotta be a simple solution to that, that doesn't require me >> to >> >>> >> rewrite >> >>> >> the whole home page. >> >>> >> >> >>> >> But is there? Please, help! >> >>> >> >> >>> >> Thanks, >> >>> >> Bob. >> >>> >> >> >>> >> -- >> >>> >> View this message in context: >> >>> >> >> >>> >> http://www.nabble.com/Relative-URL-s-on-the-page-stop-working-after-HTTP-POST-tf3236431.html#a8994858 >> >>> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >>> >> >> >>> >> >> >>> >> >> >>> >> ------------------------------------------------------------------------- >> >>> >> Take Surveys. Earn Cash. Influence the Future of IT >> >>> >> Join SourceForge.net's Techsay panel and you'll get the chance to >> >>> share >> >>> >> your >> >>> >> opinions on IT & business topics through brief surveys-and earn >> cash >> >>> >> >> >>> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> >>> >> _______________________________________________ >> >>> >> Wicket-user mailing list >> >>> >> Wicket-user@lists.sourceforge.net >> >>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >>> >> >> >>> > >> >>> > >> >>> >> ------------------------------------------------------------------------- >> >>> > Take Surveys. Earn Cash. Influence the Future of IT >> >>> > Join SourceForge.net's Techsay panel and you'll get the chance to >> >>> share >> >>> > your >> >>> > opinions on IT & business topics through brief surveys-and earn >> cash >> >>> > >> >>> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> >>> > _______________________________________________ >> >>> > Wicket-user mailing list >> >>> > Wicket-user@lists.sourceforge.net >> >>> > https://lists.sourceforge.net/lists/listinfo/wicket-user >> >>> > >> >>> > >> >>> >> >>> -- >> >>> View this message in context: >> >>> >> http://www.nabble.com/Relative-URL-s-on-the-page-stop-working-after-HTTP-POST-tf3236431.html#a8996063 >> >>> Sent from the Wicket - User mailing list archive at Nabble.com. >> >>> >> >>> >> >>> >> ------------------------------------------------------------------------- >> >>> Take Surveys. Earn Cash. Influence the Future of IT >> >>> Join SourceForge.net's Techsay panel and you'll get the chance to >> share >> >>> your >> >>> opinions on IT & business topics through brief surveys-and earn cash >> >>> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> >>> _______________________________________________ >> >>> Wicket-user mailing list >> >>> Wicket-user@lists.sourceforge.net >> >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >>> >> >> >> >> >> ------------------------------------------------------------------------- >> >> Take Surveys. Earn Cash. Influence the Future of IT >> >> Join SourceForge.net's Techsay panel and you'll get the chance to >> share >> >> your >> >> opinions on IT & business topics through brief surveys-and earn cash >> >> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> >> _______________________________________________ >> >> Wicket-user mailing list >> >> Wicket-user@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Relative-URL-s-on-the-page-stop-working-after-HTTP-POST-tf3236431.html#a9023644 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/Relative-URL-s-on-the-page-stop-working-after-HTTP-POST-tf3236431.html#a9023731 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user