setHomepage("/index");
}
}
public void invoke(PipelineContext pipelineContext) throws Exception {
TurbineRunDataInternal rundata = (TurbineRunDataInternal) getTurbineRunData(request);
String target = null;
// ȡ��target����ת����ͳһ���ڲ�������
String pathInfo = ServletUtil.getResourcePath(rundata.getRequest()).substring(
component.getComponentPath().length());
if ("/".equals(pathInfo)) {
pathInfo = getHomepage();
}
// ע�⣬���뽫pathInfoת����camelCase��
int lastSlashIndex = pathInfo.lastIndexOf("/");
if (lastSlashIndex >= 0) {
pathInfo = pathInfo.substring(0, lastSlashIndex) + "/"
+ StringUtil.toCamelCase(pathInfo.substring(lastSlashIndex + 1));
} else {
pathInfo = StringUtil.toCamelCase(pathInfo);
}
target = mappingRuleService.getMappedName(EXTENSION_INPUT, pathInfo);
rundata.setTarget(target);
// ȡ��action
String action = StringUtil.toCamelCase(trimToNull(rundata.getParameters().getString(actionParam)));
action = mappingRuleService.getMappedName(ACTION_MODULE, action);
rundata.setAction(action);
// ȡ��actionEvent
String actionEvent = ActionEventUtil.getEventName(rundata.getRequest());
rundata.setActionEvent(actionEvent);
pipelineContext.invokeNext();
}