Something like this ?
/WEB-INF/tags/hashedInput.tag
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ attribute name="path" required="true" %>
<input type="hidden" id="${path}" name="${path}" value="1" />
<input type="hidden" name="${path}_hashed" value="someHash" />
myjsp.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" trimDirectiveWhitespaces="true"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="zf" tagdir="/WEB-INF/tags" %>
<zf:hashedInput path="id" />