How to setup Wicket Examples in Eclipse
Wicket examples is a baby step to learn about wicket, and a must reference site for all new or experience wicket’s developers. In wicket examples , it’s almost contains all of the wicket’s component usage.
Wicket’s examples
http://www.wicketstuff.org/wicket13/
Well, it will be better if we can setup a wicket example in our local developement environment as reference.
How do configure the wicket examples site in our local eclipse environment?
1. Download and configure maven properly http://maven.apache.org/
2. Download latest wicket released http://wicket.apache.org/
3. Extract the downloaded wicket files. e.g apache-wicket-1.4-rc1.zip

4. Copy the wicket-examples folder to a new location, avoid to mess up the original source. e.g
d:\wicket-examples
5. Access the d:\wicket-examples, and type following maven command
d:\wicket-examples> mvn eclipse:eclipse -Dwtpversion=1.5

P.S This command tell maven to create an eclipse web project for wicket examples. Maven will automatically download all the wickets’ dependency libraries. I like this feature ~
6. In Eclipse IDE, Select File–>Import…–>Existing Projects into Workspace (under General folder), click next and Browse to wicket web project folder you created just now.

7. Configure M2_REPO classpath variables
- Click windows –> reference
- Java –> Build Path –> Classpath Variables –> Click New button and select your maven local repository.

P.S mvn eclipse:eclipse will create all wickets’ dependency libraries in .classpath file and prefix with M2_REPO variable, we have to configure this M2_REPO , else we can not locate the libraries.
8. Create a new tomcat server and select the wicket-examples project

9. Start tomcat server and type http://localhost:8080/wicket-examples/ in your browser.

Done. we had clone the whole wicket examples site into our local development environment (Eclipse), it’s even included all the wickets’ example source code for quick reference.
Happy wicket coding ~
Q & A
Question : After deployed wicket examples, i hit the wicket HTML files missing or not found exception while accessing the wicket examples site. Is this a wicket source code error?
Answer : No really wicket problem. I had encountered the same error in my old Eclipse IDE as well. This may cause by the Eclipse default resourceCopyExclusionFilter setting (HTML file filter by default).Please explicit the file type we want to filter in org.eclipse.jdt.core.prefs file under setting folder.
Copy following code and append to org.eclipse.jdt.core.prefs file.
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,*.testsuite,*.deploy, *.location,*.execution,*.datapool,*.artifact,*.svg

P.S Latest Eclipse IDE do not have this problem.
- Java Core Technology - Java RegEx, Java XML, Java I/O, Java Misc
- J2EE Frameworks - Hibernate, Spring 2.5, Spring MVC, Struts 1.x, Struts 2.x
- Build Tools - Maven, Archiva
- Unit Test - jUnit, TestNG
- Client Scripts - jQuery
Hi..
i’m new wicket user. I would like to ask your advise about the windows model. I found out the when windows model popup. The current main page at backgroup are disabled. Due to the user requirement, how to i allow the current page at backgroup are allow to edit. Because not very page we must be disabled. Thanks
Green
Thank you very much, this article helped me a lot!!!!
hello, how are you friend, i follow the steps for developing the application but it shows a server error, I could help, the error that showed me tomcat is:
HTTP Status 404 – / wicket-examples /
————————————————– ——————————
type Status report
Message / wicket-examples /
Desc The requested resource (/ wicket-examples /) is not available esti ¿½.
404 is not found, you should check your ‘web.xml’ configuration file. Or would you mind to zip it and send it to me for the debuging?
Excellent article! It got me going even though I use Linux and wanted Wicket 1.3.5. Thanks a lot! (Please keep it up, it’s one of the few resources with this information.)
indeed, Wicket’s resources are too little…
Thank you !
This is the only place I have found telling how to get everything with wicket including the examples to work. “How difficult can it BE!!”
/Tommy
Welcome, enjoy wicket programing ~
[...] Please set up a wicket example to explore more about wicket usage.How do setup Wicket Examples in Eclipse [...]