Venkat Sadasivam
Venkat Sadasivam

Reputation: 1464

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}/" />

Upvotes: 2

Views: 122

Answers (1)

martin-g
martin-g

Reputation: 17513

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>"));

Upvotes: 5

Related Questions