I am getting the "Can not determine Markup. Component is not yet connected to a parent" issue in Wicket.I see that the html files are present in the package where class files are present in both application installation location of glassfish server and the WAR file.
Asked
Active
Viewed 4,499 times
4
-
1This problem description is not sufficient for us to help you. We need to see some code. – Don Roby Nov 22 '14 at 14:15
-
1The question possibly duplicates Java/Wicket: Compile Basic Hello World with Resources . Check if you're using maven and if you don't miss filtering of source files to include the markup. – Martin Strejc Nov 24 '14 at 16:19
-
where is the location of your web pages?. Last time i got this error. it was cause Wicket couldn't find the corresponding web pages so i put them in the same location as their class files – Zuko Mar 20 '17 at 08:20
3 Answers
4
Make sure you include the filtering settings in our pom.xml
:
<build>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
</resource>
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<filtering>false</filtering>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<filtering>false</filtering>
<directory>src/test/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
...
</build>
You can check the generated pom.xml
after creating a quickstart project following https://wicket.apache.org/start/quickstart.html

cringe
- 13,401
- 15
- 69
- 102
3
If you're using Gradle, include the following in your build.gradle
file:
sourceSets {
main {
resources {
srcDirs += ['src/main/java']
includes = ["**"]
// or specifically: includes = ["**/*.html"]
}
}
}
This ensures that the HTML files will be added to the WAR file.

Flux
- 9,805
- 5
- 46
- 92
0
Check if:
- the HTML file is misnamed
- the resolving component fails to find the corresponding HTML file to the Wicket java class
- the HTML files are not included in the WAR

publicMee
- 170
- 1
- 13