Juergen, thanks for that explanation.
But, there's still something going wrong. This is now the Log4j message
I'm getting:
2005-07-03 14:22:14,140 [http-8084-Processor23] DEBUG
wicket.util.resource.locator.ResourceStreamLocator - Attempting to
locate resource 'wicket/examples/navomatic/Page1.html' on path [folders
= [], webapppaths: [/C:\Documents and
Settings\Administrator\.netbeans\dev\jakarta-tomcat-5.5.7_base\webapps\NavoMatic\web/]]
Now, the "webapppaths" is 100% correct. It is where Page1.html is found.
However, it seems as if Wicket is looking for
"wicket/examples/navomatic/Page1.html", which is not the same as
"Page1.html".
So, Page1.html still isn't found... Why would Wicket be looking for
"wicket/examples/navomatic/Page1.html"? Maybe because Page1.java is
found there? But I thought that the reason that I changed the init() is
exactly because I want to be able to put the HTML page in a different
directory to where the Page1.java is found.
By the way, this is the init() I'm using:
protected void init() {
String root =
getWicketServlet().getServletContext().getRealPath("web");
getSettings().addResourceFolder(root);
}
-- Geertjan
Juergen Donnerstag wrote:
On 7/2/05, Geertjan Wielenga <[EMAIL PROTECTED]> wrote:
Juergen,
Unfortunately you can not explicitly set webappaths.
Does this mean that I currently can't put the HTML files in a different
directory? That's all that I'm trying to do.
no, you can. This is how it looks like:
final Folder f = new Folder(folder);
if (f.exists())
{
folders.add(f);
}
else
{
if (!folder.startsWith("/"))
{
folder = "/" + folder;
}
if (!folder.endsWith("/"))
{
folder += "/";
}
webappPaths.add(folder);
}
addResourceFolder() first tests the path provided "/" for existence.
If it exists, it'll be added to folders, else to webapppaths. IMO this
implementation needs some improvement as you can not add "/" to
webappaths. May I suggest you open an RFE for that.
OK, I will.
-- Geertjan
The solution
obviously is use servletContext().getAbsolutePath("/").
Juergen
On 7/2/05, Geertjan Wielenga <[EMAIL PROTECTED]> wrote:
Thanks a lot. I think I'm a step further now.
In the NavoMatic example, I put Page1.html in my web folder (the web
root of the application).
And this is my init() method in NavomaticApplication.java:
protected void init() {
getSettings().addResourceFolder("/");
}
And this is the debug message that results:
2005-07-02 20:41:25,140 [http-8084-Processor23] DEBUG
wicket.util.resource.locator.ResourceStreamLocator - Attempting to
locate resource 'wicket/examples/navomatic/Page1_en_US.html' on path
[folders = [\], webapppaths: []]
It seems to me that I need to set "webapppaths" and nor "folders", as I
am currently doing. If "webapppaths" were set to "/", instead of
"folders", I think the problem would be resolved. Or else the probelm
lies elsewhere.
Can anyone shed light?
-- Gj
Juergen Donnerstag wrote:
copied from one of the previous mails (the mailings are available at
gmane which provides a search facilitiy):
The error message is telling you that wicket cannot find the markup
file for the WicketExampleHeader component in the gov.irs.cts package,
the file should be named WicketExampleHeader.html.
In order to enable the debug messages you need to edit your
log4j.properties file and add the following line:
log4j.logger.wicket.util.resource=DEBUG
this will turn on debug msgs only for the resource package, if you
want to turn on debug messages for the entire wicket change
log4j.logger.wicket=INFO
to
log4j.logger.wicket=DEBUG
see http://logging.apache.org/log4j/docs/ for docs on how to configure log4j
Igor
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opclick
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opclick
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opclick
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user