You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by wheleph <wh...@gmail.com> on 2007/06/11 14:46:08 UTC
DefaultRequestTargetResolverStrategy
Hello, everyone!
I've got the following problem using Wicket-1.2.6:
I have class EcoBasePage. ManualPage is its subclass.
EcoBasePage acts as a template that holds navigation links and
ManualPage inserts in it static html-page that is adressed by selected
link. Here is ManualPage.html:
<wicket:extend>
<iframe wicket:id="manualContentFrame" src="manual/Page0.html"/>
</wicket:extend>
(attribute src is actually variable depending on the navigation links).
And when I click on the link I get the 404 error message in the frame.
The structure of my app is:
Eco[context]
|
-manual
|
- Page0.html
......
-WEB-INF
......
After changing it to
Eco[context]
|
eco
|
-manual
|
- Page0.html
......
-WEB-INF
......
the problem has gone.
After exploring the problem I found that
WebExternalResourceRequestTarget.respond(RequestCycle requestCycle)
resolves resources using its url attribute. And url is
"/eco/manual/Page0.html". eco is the name of my servlet and it has
nothing to do with resource resolving.
It's populated through the following lines:
// DefaultRequestTargetResolverStrategy.resolveExternalResource(...)
final String url = '/' + requestCycle.getRequest().getRelativeURL();
return new WebExternalResourceRequestTarget(url);
and
// ServletWebRequest.getRelativeURL()
String url = httpServletRequest.getServletPath();
final String pathInfo = httpServletRequest.getPathInfo();
if (pathInfo != null)
{
url += pathInfo;
}
I think that it's DefaultRequestTargetResolverStrategy's bug. It
should use getPath() instead of getRelativeURL().
I'm actually a freshman in Wicket and web development in general. Is
it really Wicket's bug or I've missed something important?
Thanks in advance
--
View this message in context: http://www.nabble.com/DefaultRequestTargetResolverStrategy-tf3901373.html#a11059933
Sent from the Wicket - Dev mailing list archive at Nabble.com.