Wicket

How to setup Brix-cms (with Apache Jackrabbit as a cluster) - Part 1 of 3

PS: This tutorial assumes that you are familiar with deploying applications (war files) in Tomcat, setting up datasource\connection pooling using Apache DBCP and in using H2 Database. Objective: Setup two instances of Brix-cms backed by a clustered Jackrabbit JCR on the back-end persisted onto a H2 database. Because there is so much to cover, I will cover the pieces in three installments. Installment #1: What and why of Brix-cms. Intro into why we care about Brix and JCR.

Forwarding to a URL from Wicket

Sometimes we need to forward to a servlet or resource that’s outside of Wicket such as a servlet. Here’s how: Modify your web.xml to define your servlet as well as your Wicket application “ignorePaths” init-param: [sourcecode language=“xml”] Wicket Example MyApplication org.apache.wicket.protocol.http.WicketFilter applicationClassName com.gu.MyApplication wicket.configuration deployment ignorePaths images/,s/ MyApplication /* SomeServlet com.gu.SomeServlet SomeServlet /s/koolkat.do [/sourcecode] The first observation is that Wicket is running as a Filter and not a Servlet.

ContextPath in Apache Wicket

One of the first things I found as I was getting familiar with Wicket is how do you point to resources that are part of a page. Well I did some digging around to find out so I’m documenting it here for others who might be facing the same challenges as they discover Apache Wicket. Problem: You have pages in Wicket that are HTML with “Wicket” tags. But then you might want to point to resources such as CSS style sheets or JavaScript that’s part of a page.