please change it to /app/* or something
and then in the root you place a index.html that does a meta refresh to /app
johan
On 3/6/06, Vivek Srivastav <[EMAIL PROTECTED]> wrote:
Hi
I am trying to write first wicket application, the helloworld example,
however when I deploy the application and browse to the context URL I
get "Directory Listing for /", despite the fact that I have set the home
page to the Hello.class. I am using wicket 1.1.1. I am a little perplexed.
Following is my code:
CORViewWebApp.java
[code]
/*
* Created on Mar 6, 2006
*
* This distribution may include materials developed by third parties.
*
* Copyright (c) 2004 Vivek Srivastav. All rights reserved.
* U.S. - Commercial software. Use is subject to license terms.
*/
package org.vss.wicket;
import wicket.protocol.http.WebApplication ;
public class CORViewWebApp extends WebApplication {
public CORViewWebApp() {
super();
System.out.println("Initializing the wicket application");
getPages().setHomePage( Index.class);
}
public void init() {
getSettings().configure("development", "/");
}
}
[/code]
Index.java
[code]
/*
* Created on Mar 6, 2006
*
* This distribution may include materials developed by third parties.
*
* Copyright (c) 2004 Vivek Srivastav. All rights reserved.
* U.S. - Commercial software. Use is subject to license terms.
*/
package org.vss.wicket;
import wicket.markup.html.WebPage;
import wicket.markup.html.basic.Label;
public class Index extends WebPage {
/**
*
*/
private static final long serialVersionUID = 7967968495142841666L;
public Index() {
this.add(new Label("message","Hello World"));
}
}
[/code]
Index.html
[code]
<html>
<body>
<span wicket:id="message">Message goes here</span>
</body>
</html>
[/code]
WEB-INF/web.xml
[code]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>CORViewWebApp</display-name>
<servlet>
<servlet-name>CORViewWebApp</servlet-name>
<servlet-class>wicket.protocol.http.WicketServlet</servlet-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>org.vss.wicket.CORViewWebApp</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CORViewWebApp</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
[/code]
WAR file listing:
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/web.xml
WEB-INF/lib/
WEB-INF/lib/commons-logging-1.0.4.jar
WEB-INF/lib/junit-3.8.1.jar
WEB-INF/lib/log4j-1.2.11.jar
WEB-INF/lib/ognl- 2.6.7.jar
WEB-INF/lib/servletapi-2.3.jar
WEB-INF/lib/wicket-1.1.1.jar
WEB-INF/classes/
WEB-INF/classes/org/
WEB-INF/classes/org/vss/
WEB-INF/classes/org/vss/wicket/
WEB-INF/classes/org/vss/wicket/CORViewWebApp.class
WEB-INF/classes/org/vss/wicket/Index.class
WEB-INF/classes/org/vss/wicket/Index.html
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
