Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Use Wicket With JEE6

DZone's Guide to

How to Use Wicket With JEE6

· Java Zone ·
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

Since JEE6 we no longer need a deployment descriptor (web.xml), so how do we declare the necessary configurations of Wicket?

Solution: Create an empty class that inherits from WicketFilter and annotated with the necessary config.

import javax.servlet.annotation.WebFilter;
import javax.servlet.annotation.WebInitParam;
import org.apache.wicket.protocol.http.WicketFilter;


@WebFilter(value = "/*",
initParams = { @WebInitParam(name = "applicationClassName", value = "tn.blog.dev.MyApplication")
, @WebInitParam(name="wicket.configuration", value="deployment")})
public class MyFilter extends WicketFilter{

}
 

Note:You can add as many prameters as you want.

Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}