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

Download Microservices for Java Developers: A hands-on introduction to frameworks and containers. Brought to you in partnership with Red Hat.

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.

Download Building Reactive Microservices in Java: Asynchronous and Event-Based Application Design. Brought to you in partnership with Red Hat

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}