Venkat Sadasivam Venkat Sadasivam - 24 days ago 11
Java Question

How to render <base> tag in wicket framework

What are the ways to render base tag using wicket framework?

In JSP I can do something like this:

<base href="${pageScope.contextPath}/" />

Answer

In YourPage.html:

<head>
   ...
   <base wicket:id="base"/>
   ...
</head>

In YourPage.java:

WebComponent base = new WebComponent("base");
add(base);
base.add(new AttributeModifier("href", "<the url>"));
Comments