Pega nome do Channel corrente.

RequestContext requestContext = PageUtil.getCurrentRequestContext(pageContext); // vignette request context
Channel currentChannel = requestContext.getRequestedChannel();
currentChannel.getName();

Simples web.xml file

<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app version=”2.4″
xmlns=”http://java.sun.com/xml/ns/j2ee”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd” >
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
</web-app>

Pegar url de um contentIntance

String ciUrl = “”;
if (requestContext.getRequestedChannel() != null) {
String channelId = requestContext.getRequestedChannel()
.getContentManagementId().getId();
ContentInstance ci = (ContentInstance) ItemRegionUtil
.getContentItem(pageContext);

if (ci != null) {
ciUrl = XSLPageUtil.buildLinkURI(requestContext, ci
.getContentManagementId().getId(), channelId, “print”);
}
}
}

Build automático

<?xml version=”1.0″?>

<project name=”springapp” basedir=”.” default=”usage”>
<property file=”build.properties”/>

<property name=”src.dir” value=”src”/>
<property name=”web.dir” value=”war”/>
<property name=”build.dir” value=”${web.dir}/WEB-INF/classes”/>
<property name=”name” value=”springapp”/>

<path id=”master-classpath”>
<fileset dir=”${web.dir}/WEB-INF/lib”>
[...]

Olá mundo!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!