For example, I put HTML in the HTML subdirectory under WebApp ....
WICKET points
1 This subdirectory can be looked up according to the package name series, meaning that the same package directory structure should be created in the directory, just like the package under Java.
2 cannot be placed under the Web-inf directory
The General project directory structure is
Project/src/main/(Java,resources,webapp)
Project/src/test
Project/target
Java code in Project/src/main/java/com.shark.wicket.controll
So put the HTML on the project/src/main/webapp/html/com.shark.wicket.controll
Netbean 8 does not allow you to build the package in this directory, I was built directly under the directory.
The correct code is as follows
Import Org.apache.wicket.core.util.file.WebApplicationPath;
Import org.apache.wicket.protocol.http.WebApplication;
public class Helloworldapplication extends WebApplication
{
@Override
protected void init ()
{
super.init ();
Getresourcesettings (). Getresourcefinders (). Add (New Webapplicationpath (Getservletcontext (), "HTML");
Getresourcesettings (). Getresourcefinders (). Add (New Webapplicationpath (Getservletcontext (), wicket/src/main/ Webapp/html "));
I don't know why NetBeans can not write the full path.
@Override public
Class gethomepage ()
{return
homepage.class
}
}