Custom actions in KCenter
The following sample demonstrates how to create a new custom action in the KCenter.
Sample based on a JSP
Section titled “Sample based on a JSP”Step 1 - Create a sample JSP file
Section titled “Step 1 - Create a sample JSP file”Create the following sample JSP file and copy it to the webapps/openkm folder named test.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %><%@ page isErrorPage="true" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html><head> <script type="text/javascript" src="<%=request.getContextPath() %>/kcenter/api/common.js"></script> <script type="text/javascript" src="<%=request.getContextPath() %>/kcenter/api/modal.js"></script></head><body> <h1>Quick sample about how to create a custom action in the KCenter</h1>
<p><b>UserId:</b> <%=request.getParameter("userId")%></p> <p><b>Uuid:</b> <%=request.getParameter("uuid")%></p> <p><b>Encrypted token:</b> <%=request.getParameter("token")%></p>
<button onclick="_closeCustomFeatureModal()">Close popup</button></body></html>