the include component tries to construct a url from pieces in your servlet request such as servletrequest.getprotocol, servletrequest.getservername, etc
what you have to do is trick it into constructing a url that looks like this: file:///some/dir/static/footer.html you have to play around with setters on mockservletrequest and looking at the source of Include component to see how it uses them. if you cannot get it to do what you want then this component may not work in the test environment. as the last resort you can toggle its visibility if its running in a testcase. -igor On Wed, Aug 24, 2011 at 9:06 AM, Alexander Gubin <[email protected]> wrote: > I saw similar post about 2 years ago, but seems that the question was > left unaswered. > > http://wicket-users.markmail.org/message/o6ub7gjxrheevlo4?q=test+include > > I have a page with Include, works fine, however when testing I get: > > org.apache.wicket.util.resource.ResourceStreamNotFoundException: > Resource http://localhost/BasePageTestCase$1/static/footer.html could > not be opened > > > Maurice Marrick mentioned setting correct path to WicketTester, so it > can resolve static resources. How would one do that? > > I tried "/" or "/static" with no luck - same error > > please advise > > Sincerely, > > Alexander > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
