WICKET 6 Relocate the directory where HTML resides __html

Source: Internet
Author: User

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

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

       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 () 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.