just get the servlet context from the wicket servlet and load the file with the getResourceXXX() methods
johan
On 4/6/06, Matthias Albert <[EMAIL PROTECTED]> wrote:
Johan Compagner schrieb:
> is it really a servlet resource or just a file on disk?
> Because if it is a servlet resource you need something like a request
> dispatcher or open an url to it.
> Because else the servlet is not invoked.
Is the servlet really only invoked if I send a new request? I have a
PageFactory.newPage method that is invoked properly, so the Wicket
servlet should be active.
The init method of my derived WebPage class is invoked correctly, too.
I tried to set my own ResourceFinder in the DerivedWebApplication.init()
method. The problem is then that Wicket does not find its own internal
resources any more at startup.
The same problem occurs when I set my own CompoundResourceStreamLocator.
So my main questions are at the moment:
1. How can I load a file relative to the web application root, e.g.
WEPPAPP/pages/page1.html?
This should not be relative to thew classpath.
2. How can I achieve this without interfering with Wicket's internal
resource finding mechanism?
Thanks,
Matthias
>
> johan
>
>
>
>
> On 3/28/06, *Matthias Albert* <[EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>> wrote:
>
> What must be done inside a WebPage object to obtain access to a servlet
> resource via:
>
> IResourceFinder resfinder =
> getApplication().getResourceSettings().getResourceFinder();
>
> URL url = "">>
> ?
>
> file.html is an ordinary static HTML page. The result url is null,
> although the file.html exists in the subdir directory under the webapp
> root. /subdir/file.html doesn't work either.
>
> Thank you
>
> Matthias Albert
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> <mailto: [email protected]>
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
