[Wicket-user] (No subject)

2007-06-08 Thread Volodymyr Sobotovich
  [EMAIL PROTECTED]  
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DefaultRequestTargetResolverStrategy

2007-06-08 Thread Volodymyr Sobotovich
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
-- 
wheleph

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user