Reputation: 41
Never having use Wicket before I installed Apache Wicket 8.0.0-M8 on Windows 10. I also installed apache-tomcat-9.0.7.
I replaced the following Tomcat conf folder files with those provided by wicket:
context.xml, server.xml
I used Eclipse Neon's Maven option to create a project called myproject. Eclipse generated the following web.xml file which I relocated to:
<TOMCAT_HOME>\webapps\myproject\WEB-INF
That web.xml file looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
<display-name>myproject</display-name>
<!--
There are three means to configure Wickets configuration mode and they
are tested in the order given.
1) A system property: -Dwicket.configuration
2) servlet specific <init-param>
3) context specific <context-param>
The value might be either "development" (reloading when templates change) or
"deployment". If no configuration is found, "development" is the default. -->
<filter>
<filter-name>wicket.myproject</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.quantech.myproject.WicketApplication</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>wicket.myproject</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
Eclipse found the following problems with this file:
TargetNamespace.1: Expecting namespace 'http://java.sun.com/xml/ns/javaee', but the target namespace of the schema document is 'http://xmlns.jcp.org/xml/ns/javaee'.
When I load web.xml into XMLSpy I get the message:
This file is not valid. Root element 'web-app' is not defined in DTD/Schema.
Anyone have a clue what is wrong here?
thanks,
Terry
Upvotes: 1
Views: 506
Reputation: 17513
I replaced the following Tomcat conf folder files with those provided by wicket:
context.xml, server.xml
Wicket doesn't provide such files!
Eclipse generated the following web.xml file
Eclipse found the following problems with this file:
Bad Eclipse! Just ignore these errors/warnings. Tomcat won't complain. To make Eclipse happy you will have tweak its configuration. I can't help you with that though. I use different IDE.
Upvotes: 1