Paste the source code:

*HelloWorldPage.html:*

*HelloWorldPage.java:*
package myWicket;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;

public class HelloWorldPage extends WebPage {
        private static final long serialVersionUID = 1L;

        public HelloWorldPage() {
                add(new Label("message", "Hello World using Wicket!!"));
        }
}

*HelloWorldApplication.java:*
package myWicket;

import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.WebApplication;

public class HelloWorldApplication extends WebApplication {
        public HelloWorldApplication() {
        }

        @Override
        public Class<? extends Page> getHomePage() {
                return HelloWorldPage.class;
        }
}

*web.xml:*
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
        id="WebApp_ID" version="3.0">
        <display-name>MyFirstWicket</display-name>
        <filter>
                <filter-name>HelloWorldApplication</filter-name>
                
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
                <init-param>
                        <param-name>applicationClassName</param-name>
                        
<param-value>myWicket.HelloWorldApplication</param-value>
                </init-param>
        </filter>
        <filter-mapping>
                <filter-name>HelloWorldApplication</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>
        <welcome-file-list>
                <welcome-file>index.html</welcome-file>
                <welcome-file>index.htm</welcome-file>
                <welcome-file>index.jsp</welcome-file>
                <welcome-file>default.html</welcome-file>
                <welcome-file>default.htm</welcome-file>
                <welcome-file>default.jsp</welcome-file>
        </welcome-file-list>
</web-app>



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Why-does-my-HelloWorldPage-not-work-tp4656451p4656498.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to