A simple wicket and terracotta example
Since the publication of the updated wicket terracotta plugin I have been working on a simple example app.
I decided to use the terracotta maven plugin, which means that you dont need to download anything, maven will do it all for you.
Simply extract the zip file and run
mvn tc:run
Then point your browser at http://localhost:8080/simple-wicket or http://localhost:8081/simple-wicket to see it in action.
You can read more about the terracotta maven plugin on this url
Edit:
I have corrected the typo pointed out to me. Just goes to show that you should test your code in a different user account to the one you have multiple versions of the same project installed in your local maven repo.
You can download the source code here simple-wicket1.zip
November 24th, 2008 at 5:58 pm
Very cool,
I especially love how I could run it with one command straight from source. That is so powerful for experimenting
November 24th, 2008 at 11:24 pm
I found it really useful, however I did have some problems with the url of the deployed webapp, but i think that had more to do with cargo than terracotta. It was taking the name of the produced war file, and I didn’t figure out how to run my app on the root context.
November 25th, 2008 at 3:58 pm
Typical, it’s really great for the people trying the thing out but getting the pom right and getting past all the bugs and weirdness of maven can be quite challenging. I’m hopeful that they will make it less fragile/verbose over time
December 7th, 2008 at 10:19 pm
That’s handy, thanks.
If any of your readers come across the exception below, its due to spaces in the path (eg c:\Documents And Settings\user1\…).
[INFO] ————————————————————————
[INFO] Waiting completion of the DSO process
[INFO] [cargo0] Deploying [c:\Documents And Settings\user1\My Documents\workspace\simple-wicket\target\simple-wicket.war] to [target/cargo0/webapps]…
[INFO] [cargo0] Tomcat 6.x starting…
[INFO] [cargo1] Deploying [c:\Documents And Settings\uesr1\My Documents\workspace\simple-wicket\target\simple-wicket.war] to [target/cargo1/webapps]…
[INFO] [cargo1] Tomcat 6.x starting…
[WARNING] [cargo0] java.lang.NoClassDefFoundError: And
[WARNING] [cargo0] Caused by: java.lang.ClassNotFoundException: And
[WARNING] [cargo0] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[WARNING] [cargo0] at java.security.AccessController.doPrivileged(Native Method)
[WARNING] [cargo0] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[WARNING] [cargo0] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[WARNING] [cargo0] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
[WARNING] [cargo0] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[WARNING] [cargo0] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[WARNING] [cargo1] java.lang.NoClassDefFoundError: And
[WARNING] [cargo1] Caused by: java.lang.ClassNotFoundException: And
[WARNING] [cargo1] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[WARNING] [cargo1] at java.security.AccessController.doPrivileged(Native Method)
[WARNING] [cargo1] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[WARNING] [cargo1] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[WARNING] [cargo1] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
[WARNING] [cargo1] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[WARNING] [cargo1] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[WARNING] [cargo0] Exception in thread “main”
[WARNING] [cargo0] Java Result: 1
[WARNING] [cargo1] Exception in thread “main”
[WARNING] [cargo1] Java Result: 1